Commit Graph

5134 Commits

Author SHA1 Message Date
Uli Schlachter adff92ca53 property.c: Don't leave stuff on the lua stack
property_update_wm_hints() pushes the client but never pops it. This is a really
bad thing (tm).

Signed-off-by: Uli Schlachter <psychon@znc.in>
Signed-off-by: Julien Danjou <julien@danjou.info>
2010-02-10 09:46:28 +01:00
Uli Schlachter bec9e24e7f client_focus_update(): Balance the lua stack
There is a push 15 lines before the push that is removed here, but the client
that is pushed there was never popped. Bad.

Fix this by letting luaA_class_emit_signal() do the needed pop for us.

Signed-off-by: Uli Schlachter <psychon@znc.in>
Signed-off-by: Julien Danjou <julien@danjou.info>
2010-02-10 09:46:25 +01:00
Thomas Arendsen Hein 5f9bd088f2 New images for maximized layout.
Based on an idea by Steve Pomeroy (xxv)

Signed-off-by: Julien Danjou <julien@danjou.info>
2010-01-24 11:23:55 +01:00
Adrian C. (anrxc) 56c1fdf226 awful.rules: fix client tagging with multiple screens
Commit a757dda replaced the awful.client.movetotag call with c:tags()
in the tag property handler. Which introduced a regression when more
than one screen is used. The awful.tag.withcurrent function was being
called even when there was a valid tag property. Now the clients
screen is set to the tag screen to ensure the client is moved to the
correct tag and screen.

Signed-off-by: Adrian C. (anrxc) <anrxc@sysphere.org>
Signed-off-by: Julien Danjou <julien@danjou.info>
2010-01-11 10:09:19 +01:00
Adrian C. (anrxc) dfd6060a53 awful.autofocus: improve client focus with multiple screens
Changing screen focus to an empty tag leaves focus on a client on the
previous screen, if a tag with clients is focused next the focus
remains on the previous screen. Now awful.autofocus compares the tag
screen and clients screen to learn if the focus should be given to a
client on the focused screen. Client that gets the focus is selected
from history, as usual.

Signed-off-by: Adrian C. (anrxc) <anrxc@sysphere.org>
Signed-off-by: Julien Danjou <julien@danjou.info>
2010-01-10 10:31:17 +01:00
koniu a757ddabc4 awful.rules: tag clients without flicker (FS#664)
We unregister the default awful.tag.withcurrent 'manage' signal handler
and have awful.rules.apply handle initial client tagging.

Signed-off-by: koniu <gkusnierz@gmail.com>
Signed-off-by: Julien Danjou <julien@danjou.info>
2010-01-08 19:11:25 +01:00
koniu a1f0669b64 awful.tag: register 'withcurrent' explicitly
This explicitly registers withcurrent(c) as a manage signal handler so
that it can be removed if necessary.

Signed-off-by: koniu <gkusnierz@gmail.com>
Signed-off-by: Julien Danjou <julien@danjou.info>
2010-01-08 19:11:24 +01:00
Julien Danjou d09c3c02e8 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:42:05 +01:00
Adrian C. (anrxc) 9038c5165d 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:14 +01:00
Alex Alexander b24348219e 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:52:43 +01:00
Julien Danjou 553b2bfe99 change codename
Signed-off-by: Julien Danjou <julien@danjou.info>
2010-01-04 09:50:02 +01:00
Adrian C. (anrxc) 6a44c60f4f Cleanup after revert of "Handle synthetic UnmapNotify events"
The revert accidentaly replaced window_state_get_reply and
window_state_get_unchecked calls in event.c with:
xwindow_get_state_reply/unchecked respectively.

Signed-off-by: Adrian C. (anrxc) <anrxc@sysphere.org>
Signed-off-by: Julien Danjou <julien@danjou.info>
2010-01-04 09:47:21 +01:00
Adrian C. (anrxc) 799c94ff48 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:35 +01:00
Uli Schlachter 6cd4f9d11a Revert "Handle synthetic UnmapNotify events"
This reverts commit 8e672897cb.

Signed-off-by: Julien Danjou <julien@danjou.info>
2009-12-29 09:53:12 +01:00
Gwenhael Le Moine 407db4c0df 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:43 +01:00
Julien Danjou 742d85dd0e 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:41:39 +01:00
Pierre Allegraud a4fb1e00f7 build: make manpage compression optional
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-12-28 10:44:10 +01:00
Uli Schlachter 531381fa6d 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:42:06 +01:00
Julien Danjou 1e2fcadfd0 dbus: add support for array as returned type
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-12-28 10:39:51 +01:00
Julien Danjou b92c3735a1 dbus: move some convert code in a function
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-12-28 10:36:41 +01:00
Uli Schlachter 365e80c5bb 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:17 +01:00
Pierre Allegraud 1fd1155897 build: do not install .in files
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-12-22 12:46:29 +01:00
Pierre Allegraud 93fdc17799 fix build on NetBSD (FS#706)
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-12-21 08:48:21 +01:00
Julien Danjou f8984fc503 image: load with image
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-12-14 10:27:15 +01:00
Julien Danjou 4b622523eb 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:24:08 +01:00
Julien Danjou 84acfc4652 systray: fix screen number retrieval
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-12-10 10:10:20 +01:00
Sébastien Gross a8425df036 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:21 +01:00
Adrian C. (anrxc) 878f9e7580 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:15 +01:00
Uli Schlachter 3d60aa7d83 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:33:09 +01:00
Robert Lehmann 7ea3c35cc2 naughty: fix CloseNotification argument usage
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-12-01 14:15:04 +01:00
Julien Danjou b45fd1f530 dbus: fix D-Bus documentation typo
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-12-01 10:01:50 +01:00
Julien Danjou dd7362157e change codename
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-11-26 20:03:25 +01:00
Julien Danjou 3ed302239e build: dist now build .xz instead of .gz
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-11-26 20:03:25 +01:00
Hiltjo Posthuma 4c2c741743 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-25 17:10:13 +01:00
perry 298f773357 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:36 +01:00
Hiltjo Posthuma b097266925 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:48:10 +01:00
Julien Danjou a56e1b11d3 wibox: check border width
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-11-21 10:46:00 +01:00
Levin Du 553bf417f8 Fix awful.util.table.reverse
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-11-17 10:25:21 +01:00
Tomi Belan 064f4c92fd 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:15:14 +01:00
Uli Schlachter 78541da82a 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:53 +01:00
Adrian C. (anrxc) 6c5d0ca90c 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:42 +01:00
Julien Danjou 240a83d215 widget: fix screen number of layouts as arg
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-11-09 21:27:32 +01:00
Julien Danjou 88dfed11e1 dbus: check that interface is not NULL (FS#667)
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-11-09 20:50:33 +01:00
Julien Danjou ab66ce8bec dbus: field can be nil
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-11-09 20:50:27 +01:00
Julien Danjou a955519a7a util: mark strhash with nonnull
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-11-09 20:50:05 +01:00
Julien Danjou 44edd4a75e change codename
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-11-09 14:52:15 +01:00
bob 82dd61a692 awful.rules: add "callback" option when a rule matches
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-11-09 10:26:58 +01:00
Uli Schlachter c912da0189 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:22 +01:00
Uli Schlachter 8ed6d60a25 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:34:05 +01:00
Uli Schlachter 12977febee Set a wibox' bit gravity to NorthWest.
After the last patch, after each resize the X server fills the complete wibox
with its background color which means that the widgets will still flicker. This
patch fixes this by setting the wibox' bit gravity to NorthWest.

This means that if a wibox is enlarged, only the new, larger part will be filled
with the wibox' background color and the rest of the wibox' content will be left
intact. With this patch I couldn't see any flickering anymore.

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