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>
When the SHAPE extension is not available, this code prints
a harmless warn() on stderr.
Signed-off-by: Uli Schlachter <psychon@znc.in>
Signed-off-by: Julien Danjou <julien@danjou.info>
Basically, we get the size we want the systray to be drawn at upon drawing
the tray, thus removing the query to the xcb_get_geometry function. As all
windows embedded in the systray are squares, their size is equal to their
height, so we simply force the size to be wibox_height * n x wibox_height,
where n is the number of embedded windows, instead of deriving it from the
largest embedded window (which, for example in the case of wicd, would be
200x200, way too much for one window on a regular wibox).
Signed-off-by: Gregor Best <farhaven@googlemail.com>
Signed-off-by: Julien Danjou <julien@danjou.info>
This is useful because tables get passed by reference instead of by
value, so we might end up modifying tables where we don't want it.
Signed-off-by: Gregor Best <farhaven@googlemail.com>
Signed-off-by: Julien Danjou <julien@danjou.info>
First, we need to actually draw values which are zero, else the background
"shines through". Since this breaks the border (it draws over the border),
drawing the border needs to be done later.
Signed-off-by: Uli Schlachter <psychon@znc.in>
Signed-off-by: Julien Danjou <julien@danjou.info>
client_hasproto() now doesn't have to query the X server anymore.
This fixes FS#543.
Signed-off-by: Uli Schlachter <psychon@znc.in>
Signed-off-by: Julien Danjou <julien@danjou.info>
The only real change in here is the first hunk to client.c which needs to
inline client_setfocus(). Nothing else in here should be a 'real' change.
Signed-off-by: Uli Schlachter <psychon@znc.in>
Signed-off-by: Julien Danjou <julien@danjou.info>
We now always know a client's WM_PROTOCOLS property without asking the X server.
Signed-off-by: Uli Schlachter <psychon@znc.in>
Signed-off-by: Julien Danjou <julien@danjou.info>
Before this, awesome_refresh() could be called multiple times per mainloop and
one had to make sure to add awesome_refresh() calls in the right places.
Now, the prepare handler is invoked just before libev puts the process to sleep
(e.g. by calling select()) and awesome_refresh() does its thing.
All redundant calls to awesome_refresh() are removed, but the one in
selection.c has to stay because this function blocks in xcb_wait_for_event()
without using libev.
Signed-off-by: Uli Schlachter <psychon@znc.in>
Signed-off-by: Julien Danjou <julien@danjou.info>
This function is only called from one place and there is no reason not
to inline it there.
Signed-off-by: Uli Schlachter <psychon@znc.in>
Signed-off-by: Julien Danjou <julien@danjou.info>
Sometimes we unref the icon image, but we did not reset NULL, which
can make the client refering to a not-refed image.
Signed-off-by: Julien Danjou <julien@danjou.info>
This variable didn't really have any effect on anything. It was only ever
checked in a function that would never be called if this flag was false.
Signed-off-by: Uli Schlachter <psychon@znc.in>
Signed-off-by: Julien Danjou <julien@danjou.info>