Commit Graph

37 Commits

Author SHA1 Message Date
Uli Schlachter 82921ef57b Correctly position wiboxes (FS#892)
Let's just quote the bug report:

A regression was introduced in commit f5a5af4001
which causes wiboxes to position themselves incorrectly on Xinerama screens
besides the first one. In lib/awful/wibox.lua.in line 49, function
set_position(), the screen number used to use wibox.screen but now just defaults
to 1. Since the screen parameter is never actually passed to set_position(),
that means that wiboxes will always use screen 1's geometry when determining the
proper position. So, if a different screen is larger or smaller or isn't aligned
with the primary screen, the wibox will either be offscreen or not on the edge.

This should be fixed by explicitly passing the right screen argument to all
functions which need it.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-04-30 17:13:56 +02:00
dodo b530da1861 add set_font to wibox.widget.textbox
Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-04-14 22:37:44 +02:00
Uli Schlachter f5a5af4001 awful.wibox: Fix for removal of screen property
Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-03-27 16:35:15 +02:00
Uli Schlachter 6a7fdc8fb0 awful.wibox: Port to new widget system
Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-10-06 14:20:30 +02:00
Uli Schlachter 03fd3f3146 awful.wibox: Remove unused local variables
Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-09-29 16:08:16 +02:00
Uli Schlachter 9a8177e457 awful.wibox: Set the window type to "dock".
Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-09-28 13:09:19 +02:00
Uli Schlachter 03e0ee53d2 Wibox: Remove shape support
Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-08-30 10:22:50 +02:00
Uli Schlachter b6c8b95e34 Convert some more code to "class signals"
Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-08-26 18:42:38 +02:00
Julien Danjou 6d332f07a0 lua{class,object}: rename signals functions
I knew this was wrong at the beginning, f*ck.

Signed-off-by: Julien Danjou <julien@danjou.info>
2010-08-25 20:28:20 +02:00
Adrian C. (anrxc) 4119e92d82 awful.wibox: update struts on align()
Setting width or height (horizontal or vertical) to an arbitrary value
causes the wibox not to be stretched. Instead the align() function is
called, which might not modify any wibox property in many situations,
or none when align parameter was not provided by the user. The major
side effect is that wibox struts were never updated and clients
covered the wibox (until a first signal handler caused struts to be
updated).

Signed-off-by: Adrian C. (anrxc) <anrxc@sysphere.org>
Signed-off-by: Julien Danjou <julien@danjou.info>
2010-03-23 11:06:32 +01:00
Pierre Mazière a89c94e9d7 Avoid wibox borders to be recovered by clients
Signed-off-by: Pierre Mazière <pierre.maziere@gmail.com>
Signed-off-by: Julien Danjou <julien@danjou.info>
2010-03-19 10:02:32 +01:00
Pierre Mazière 62ac15d9d8 fix wibox origin when stretched
Signed-off-by: Pierre Mazière <pierre.maziere@gmail.com>
Signed-off-by: Julien Danjou <julien@danjou.info>
2010-03-19 10:02:30 +01:00
Adrian C. (anrxc) bafe41e174 awful.wibox: update position on height/width property change
Changing the width or height of a (right or bottom positioned)wibox,
after it was initialized, to a value different than used when it was
created would leave the wibox in a wrong position. Position was off by
as many pixels as the difference between the old and the new
value. Now every wibox is repositioned to reflect this new setup.

Signed-off-by: Adrian C. (anrxc) <anrxc@sysphere.org>
Signed-off-by: Julien Danjou <julien@danjou.info>
2010-03-04 09:31:37 +01:00
Adrian C. (anrxc) f641ee411f awful.wibox: sanitize height/width args to function new()
When both height and width arguments are provided to the function
new() there is a check to see if one of them was a screen percentage,
and is expected to be a string. If the user provided absolute pixels,
and argument is of type number awesome will crash. Now tostring is
used to sanitize the arguments during this check.

Signed-off-by: Adrian C. (anrxc) <anrxc@sysphere.org>
Signed-off-by: Julien Danjou <julien@danjou.info>
2010-01-05 09:53:33 +01:00
Alex Alexander 8cc15d80b4 wibox: fix align
awful.wibox.align() in 3.4.x gets the available screen area from
capi.screen[screen].geometry.

this can easily result in overlapping wiboxes since the work area
provided does not account for existing wiboxes.

In my configuration I use a vertical wibox positioned at the
right and it half-overlaps my top wibox because it is streched and
hard-coded to align at the middle.

Signed-off-by: Julien Danjou <julien@danjou.info>
2010-01-05 09:53:29 +01:00
Adrian C. (anrxc) 003369e649 awful.wibox: take wibox border into account when updating struts
Function wibox_update_strut would not take the border width into
account when calculating struts. When a wibox border was in use
clients would overlap the wibox. With a border of 1px we loose 1px of
the wibox, but as the wibox border increases it is "pushed" by the
border nearest the screen edge and clients steal more and more space.

Signed-off-by: Adrian C. (anrxc) <anrxc@sysphere.org>
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-12-30 19:51:48 +01:00
Lukas Hrazky a4f8935509 wibox: remove implicit orientation change
Signed-off-by: Lukas Hrazky <lukkash@email.cz>
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-10-26 11:08:28 +01:00
Julien Danjou a6de1608a5 awful.wibox: remove useless deprecation-pass code
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-10-20 20:42:04 +02:00
Uli Schlachter 7fc0c24f4f awful.wibox: Error out on invalid positions
Signed-off-by: Uli Schlachter <psychon@znc.in>
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-09-09 19:50:52 +02:00
Julien Danjou 444edf1d03 awful.wibox: update documentation
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-09-08 17:02:56 +02:00
Gregor Best aca7afd519 awful.wibox: fix position for right and bottom
Signed-off-by: Gregor Best <gbe@intepi.net>
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-09-02 10:34:20 +02:00
Julien Danjou f848fb7844 wibox: update strut on visible change
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-08-21 20:04:29 +02:00
Julien Danjou 282cd0b3ca awful.wibox: do not arrange when changing attribute
awful.layout now listen for workarea size changes.

Signed-off-by: Julien Danjou <julien@danjou.info>
2009-08-21 15:30:48 +02:00
Julien Danjou d6fd7f1116 awful.wibox: update strut on wibox attachement
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-08-21 15:30:48 +02:00
Julien Danjou 5e2fbb3684 awful.wibox: update struts on size change
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-08-21 15:30:48 +02:00
Julien Danjou ff906a8529 awful.wibox: update position on border_width change (FS#563)
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-08-21 15:30:47 +02:00
Julien Danjou 65825bdd22 awful: move hooks to signals
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-08-21 15:30:47 +02:00
Julien Danjou 84839d456d wibox: port to new object system
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-08-21 15:30:47 +02:00
Julien Danjou b58d0f848a client: emit signal on unmanage
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-08-21 15:30:47 +02:00
Julien Danjou 7954f19417 client: emit signal on manage
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-08-21 15:30:47 +02:00
Julien Danjou 43184279e5 awful.wibox: add support for % width/height and align attribute
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-07-31 11:34:52 +02:00
Julien Danjou caa20c51e1 awful.wibox: fix computing with border width
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-07-29 12:35:26 +02:00
Uli Schlachter 86cfe51540 Add an awful functions for rounded corners
This uses hexadecimal colors, because named colors require a round trip to the X
server and are thus slower. :(

Signed-off-by: Uli Schlachter <psychon@znc.in>
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-07-27 14:23:59 +02:00
Uli Schlachter 8701792b83 awful.wibox: honour user specified geometries
If a wibox with non-north position was created and a wibox size was specified,
this function happily ignored it when it made the wibox fit.

Thanks to Garoth who found this bug.

Signed-off-by: Uli Schlachter <psychon@znc.in>
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-06-06 22:33:25 +02:00
Uli Schlachter 4b27986680 Minor fixes
Remove an unused var and fix a reference to capi.awesome

Signed-off-by: Uli Schlachter <psychon@znc.in>
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-06-06 20:20:44 +02:00
Gregor Best 8f0c6c5979 awful.wibox(): correctly handle position changes
This patch fixes a bug and changes the position handling for wiboxes:

The bug was that awful.wibox.set_position() didn't update the cached
wibox position, i.e. the wibox was moved, but the position value in the
wiboxes table stayed the same

The change in position handling was that unknown positions (i.e.
"fnord") default to "floating"

Signed-off-by: Gregor Best <farhaven@googlemail.com>
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-06-06 20:13:42 +02:00
Julien Danjou 7cc0b13eae wibox: move position handling to Lua
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-06-04 17:51:30 +02:00