Commit Graph

4972 Commits

Author SHA1 Message Date
Uli Schlachter 026247cf18 Handle synthetic UnmapNotify events *correctly*
Second try:

Turns out I messed up with XCB_EVENT_SENT() and had a "!" too much. The old code
already tried to cope with this, but forgot to actually unmap the window which
it just set to withdrawn state.

This time I tested the patch *again* and now I found even less bugs than on my
last try.

P.S.: I suck.

Signed-off-by: Uli Schlachter <psychon@znc.in>
Signed-off-by: Julien Danjou <julien@danjou.info>
2010-01-06 09:40:55 +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
Uli Schlachter d18d51e106 Revert "Handle synthetic UnmapNotify events"
This reverts commit 8e672897cb.

Signed-off-by: Julien Danjou <julien@danjou.info>
2009-12-29 09:53:20 +01:00
Gwenhael Le Moine 1fb19af03d build: fix typo
Signed-off-by: Gwenhael Le Moine <gwenhael.le.moine@gmail.com>
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-12-29 09:52:34 +01:00
Uli Schlachter 8e672897cb Handle synthetic UnmapNotify events
According to the Inter-Client Communication Conventions Manual, if you want to
switch your window to withdrawn state, you unmap it and send a synthetic
UnmapNotify to the root window.

This synthetic event fixes a race condition. When you map and unmap a window
quickly, the map will generate a MapRequest for the WM but won't actually map
the window. Thus, the unmap will be discarded (-> window not yet mapped) and the
window stays map once the WM handles the MapRequest

Before this patch, awesome just ignored the synthetic unmap notify which caused
the bug to appear again. With this patch it doesn't happen anymore.

Signed-off-by: Uli Schlachter <psychon@znc.in>
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-12-28 16:40:46 +01:00
Pierre Allegraud 12d610ff2f build: make manpage compression optional
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-12-28 10:43:52 +01:00
Uli Schlachter 8857f73ce6 Implement the GetCapabilities call in naughty
This call is required by the freedesktop specification.

Signed-off-by: Uli Schlachter <psychon@znc.in>
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-12-28 10:41:57 +01:00
Julien Danjou 596cac5fb1 dbus: add support for array as returned type
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-12-28 10:40:07 +01:00
Julien Danjou af01e176d7 dbus: move some convert code in a function
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-12-28 10:40:04 +01:00
Uli Schlachter 3d887f09c6 Make it easier to change the default layout
In older versions of awesome, the first entry in the layouts table was the
default layout. Currently it's always the floating layout.

With this patch the default is again the first entry in the layouts table.  At
the same time, floating is moved to be the first entry, so this patch doesn't
change any behavior at all.

Signed-off-by: Uli Schlachter <psychon@znc.in>
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-12-22 12:47:26 +01:00
Pierre Allegraud 1ff1667563 build: do not install .in files
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-12-22 12:46:41 +01:00
Pierre Allegraud d75e41286a fix build on NetBSD (FS#706)
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-12-21 08:48:00 +01:00
Julien Danjou c4c15dba97 image: load with image
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-12-14 10:27:28 +01:00
Uli Schlachter a038f7667c image: Use imlib2's image cache
This makes imlib add images loaded from files to its image cache again. That way
we avoid loading the same image again and again (e.g. if you cycle through the
list layouts all the layout icons are loaded).

To not reintroduce FS#651 (fixed in 2dadce9b), we call
imlib_image_set_changes_on_disk(). This causes two stat() calls if the same file
is loaded again to check if the file's timestamps changed which is still less
expensive than loading the whole image again.

Signed-off-by: Uli Schlachter <psychon@znc.in>
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-12-14 10:23:23 +01:00
Julien Danjou da53940dd9 systray: fix screen number retrieval
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-12-10 10:11:24 +01:00
Sébastien Gross ea4967fef4 tooltip: force place() if tooltip is not visible
Commit 6c5d0ca9 introduced a side effect. If tooltip text isn't changed
place() function is not called. To prevent multiple place() set_geometry
calls that function when tooltip is not visible (before it appears to the
user).

Signed-off-by: Sébastien Gross <seb•ɱɩɲʋʃ•awesome•ɑƬ•chezwam•ɖɵʈ•org>
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-12-03 14:22:28 +01:00
Adrian C. (anrxc) 39a0fba7a8 awful.menu: add keygrabber support to clients menu
Functions show() and toggle() accept a boolean parameter controlling
keyboard navigation. In case of the clients menu neither is called
directly, instead the clients menu is always re-created in case any
new clients appeard since the last invocation. This patch adds a
keygrabber parameter to the clients() function as well.

Signed-off-by: Adrian C. (anrxc) <anrxc@sysphere.org>
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-12-03 14:22:06 +01:00
Uli Schlachter b0e2bf8b95 Fix a invalid pointer crash bug
This changes wibox_t::mouse_over to a proper reference. That way one can't
remove that widget from underneath us which would lead to an unprotected lua error.

Signed-off-by: Uli Schlachter <psychon@znc.in>
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-12-02 09:32:51 +01:00
Robert Lehmann fcee5fb828 naughty: fix CloseNotification argument usage
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-12-01 14:13:52 +01:00
Julien Danjou ce5b460f24 dbus: fix D-Bus documentation typo
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-12-01 10:05:54 +01:00
Julien Danjou 4a28c6b219 build: dist now build .xz instead of .gz
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-11-26 20:03:17 +01:00
Matthias Schröder 87070cadac awful.menu: support for access keys
You can define a menuitem like before:

awful.menu({ items = { { "&awesome", myawesomemenu,
	 		    beautiful.awesome_icon },
                       { "open &terminal", terminal },
	   })

and the letters following the ampersand in itemname can be used as
access key. (at least former fvwm users might find this familiar)

When there are submenus open awesome ascends during the search from the
current menu to the top level menu.

The access key is shown underlined.

There is no warning for multiple used keys, only the first one found
gets the price.

Signed-off-by: Julien Danjou <julien@danjou.info>
2009-11-26 19:56:04 +01:00
perry cb8eac8ccf Revert "awful.autofocus: fix multiple screens autofocus"
This reverts commit 7575f64993.

As seen on ML:

Switching tags with multiple heads causes focus to change
screens with this commit

Signed-off-by: perry <perry.hargrave@gmail.com>
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-11-23 19:28:10 +01:00
Hiltjo Posthuma cb262809dd awful.menu: use actual wibox border width
We check the wibox border width for inappropiate values now, if we set
border_width to a negative value (invalid) in our theme and draw it, the
actual border_width will be 0 so the menu will be drawn incorrectly.
This fixed this.

Signed-off-by: Hiltjo Posthuma <hiltjo@codemadness.org>
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-11-21 10:47:57 +01:00
Julien Danjou 320f551a5f wibox: check border width
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-11-21 10:45:37 +01:00
Levin Du e2f292d869 Fix awful.util.table.reverse
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-11-17 10:25:12 +01:00
Tomi Belan 7575f64993 awful.autofocus: fix multiple screens autofocus
There might be multiple screens with visible windows. When closing the
last window of the current screen, try to focus them as well.

If no window has focus and yet some windows are visible (e.g. on another
screen), awesome misbehaves: it uses sloppy keyboard focus (as is the X11
default), but doesn't refresh their border colors or tasklists etc.

Signed-off-by: Tomi Belan <tomi.belan@gmail.com>
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-11-16 15:14:55 +01:00
Uli Schlachter 0194c5daf9 Wibox: Check if a window exists before changing it
wibox_set_border_color() and luaA_wibox_set_border_width() didn't check if a
wibox really had an associated X11 window before changing this window which
resulted in (silent) errors.

Signed-off-by: Uli Schlachter <psychon@znc.in>
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-11-16 15:12:46 +01:00
Julien Danjou 8966715b26 luaa: dump backtrace on panic
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-11-16 11:26:32 +01:00
Julien Danjou f219db48dc spawn: remove useless proto
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-11-16 11:26:00 +01:00
Julien Danjou e3ba851692 spawn: disable signalfd in libev
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-11-14 09:55:29 +01:00
Adrian C. (anrxc) a502e19bad awful.tooltip: call set_geometry on show()
Function set_geometry was never called if the timer_function argument
was omitted. show function only called place() which would not display
a tooltip since it didn't have proper geometry.

Signed-off-by: Adrian C. (anrxc) <anrxc@sysphere.org>
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-11-11 17:48:27 +01:00
Julien Danjou bb4d925896 xwindow: remove useless proto
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-11-10 12:00:08 +01:00
Julien Danjou c036ea5f3e globalconf: move conffile out
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-11-10 10:48:58 +01:00
Julien Danjou 8d36fefd15 image: remove bad usage of globalconf.L
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-11-10 10:48:23 +01:00
Julien Danjou 2a73f6dd9d luaa: luaA_next is static
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-11-09 21:28:37 +01:00
Julien Danjou 4daa5af04c globalconf: move prophs out
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-11-09 21:28:30 +01:00
Julien Danjou 1d65b7c55f widget: fix screen number of layouts as arg
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-11-09 21:27:26 +01:00
Julien Danjou 019608aa9e dbus: check that interface is not NULL (FS#667)
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-11-09 20:49:37 +01:00
Julien Danjou 1dfa2c2a8d dbus: field can be nil
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-11-09 20:49:02 +01:00
Julien Danjou da9664f812 util: mark strhash with nonnull
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-11-09 20:43:18 +01:00
Hiltjo Posthuma 0a9f7985f8 Rules: change example
change example since the example with a centered client doesnt work
on the default config (due to no_overlap).

Signed-off-by: Julien Danjou <julien@danjou.info>
2009-11-09 20:24:45 +01:00
Hiltjo Posthuma 3e3395a6a0 Rules: check if properties of a rule exist
Actually check if properties are set now, since we can also only
apply callbacks now.

Signed-off-by: Julien Danjou <julien@danjou.info>
2009-11-09 20:24:16 +01:00
Julien Danjou 6ee5122462 client: remove redraw()
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-11-09 13:02:45 +01:00
bob 4aaf39a899 awful.rules: add "callback" option when a rule matches
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-11-09 10:25:40 +01:00
Julien Danjou e18cbf4b16 build: add -rdynamic to CFLAGS
This allows symbol name in backtrace dumps.

Signed-off-by: Julien Danjou <julien@danjou.info>
2009-11-08 21:04:28 +01:00
Uli Schlachter a44da9fe8e wibox: check if a wibox' window exists before modifying it
If you change the .bg of an existing wibox which isn't attached to any screen
yet, then there is no window for which we can update the XCB_CW_BACK_PIXEL.

Signed-off-by: Uli Schlachter <psychon@znc.in>
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-11-08 11:23:01 +01:00
Uli Schlachter 056d9a074b wibox: make sure no garbage is painted to the screen
Wiboxes are lazily updated. This means that we could receive an expose event on
them between making them visible and actually painting their content.

Due to this we were copying undefined content to the wibox, because the pixmap
was only created just now, but it wasn't actually filled with anything yet.

Signed-off-by: Uli Schlachter <psychon@znc.in>
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-11-08 10:32:43 +01:00