Commit Graph

913 Commits

Author SHA1 Message Date
Uli Schlachter c73b1c8d4e Revert "Don't call "focus" hook in client_focus()"
This reverts commit 27f9c0177a.

This commit broke code like the following because reading client.focus would
still return the previously focused client:

awful.client.focus.byidx(1)
if client.focus then client.focus:raise() end
2010-08-17 21:34:01 +02:00
Uli Schlachter 6d1130b408 Ignore the titlebar geometry on fullscreen clients
When a client is fullscreen, it should cover the full screen. There's no point
in trying to do clever things if the titlebar is banned anyway.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-08-17 18:06:40 +02:00
Uli Schlachter 5a51778768 Unban the titlebar when leaving fullscreen
When entering fullscreen, we remove the titlebar via titlebar_ban(). Obviously,
it makes sense to unban the titlebar again when leaving fullscreen. :)

Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-08-17 18:04:33 +02:00
Uli Schlachter 6ed3b61844 Don't call "focus" hook in client_focus()
Later on that call will be done through a FocusIn event.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-08-15 13:17:56 +02:00
Uli Schlachter 4862212c14 Use globalconf.timestamp
This makes us use globalconf.timestamp instead of XCB_CURRENT_TIME in the places
where it makes sense.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-08-12 14:54:12 +02:00
Uli Schlachter b938ce00b5 Always unban a client that we are trying to focus
Previously, if a client had nofocus == true, it wasn't unminimized if sth tried
to focus it. Also, if this client had the WM_TAKE_FOCUS protocol, the focusing
would fail since it's an error to set the input focus to an unviewable window.

For consistency, this also moves the code that sets a client's minimized
property to false into client_unban() since it doesn't make sense to have a
minimized client unbanned (i.e. visible).

Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-08-12 14:35:03 +02:00
Uli Schlachter 9d1ae71cbf Add "focusable" property to client objects
If this property is true, setting "client.focus" to this client might have some
effect. If it is false, setting "client.focus" will be ignored completely.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-08-12 13:22:37 +02:00
Uli Schlachter ce4088bbf7 client_unmanage: Update WM_STATE later
According to ICCCM, if a client wants to reuse one of its windows, it has to
wait until the WM updated WM_STATE. This means updating WM_STATE should be the
very last thing we do when unmanaging a window.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-08-09 12:00:45 +02:00
Uli Schlachter 721f33d5cc Stop using libxcb-property
libxcb-property will be dropped from xcb-utils in the next release, because
upstream thinks it's not really useful and well-designed.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-08-08 16:57:08 +02:00
Uli Schlachter db958cafb4 Remove windows from the save set in unmanage
While a window is in the save set, it will automatically be made visible again
when awesome exits/dies. This makes sure that the next window manager will pick
this window up and handle it properly again.

But when a window explicitly asks not to be visible, it doesn't want to be
visible. Even if awesome dies. So we should remove the client's window from the
save set in client_unmanage.

Thanks to anrxc and his xwrits.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-07-24 19:46:23 +02:00
Uli Schlachter 84676561da Make fullscreen stacking respect EWMH
Fullscreen windows should only get their own layer when they have the input
focus. When they are unfocused they should be treated normally (FS#560).

Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-07-23 12:27:49 +02:00
Uli Schlachter 9977802d7e Improve aspect size handling
The window is now no longer enlarged to make it fit into its aspect ratio, but
only ever made lower. This was verified with a small test app that sets a min
aspect ratio of 0.5 and max aspect ratio of 2.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-07-22 10:34:41 +02:00
Uli Schlachter 227b71921d Fix some size hint mixups
Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-07-22 10:34:40 +02:00
Uli Schlachter f372388de9 Fix a minor ICCCM incompatibility
ICCCM says that the min size should be used for the base size if no base size is
specified. The only exception is when calculating the aspect ratio of the
window, in that case only the "real" base size may be used.

Awesome didn't do this last part before.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-07-22 10:34:39 +02:00
Uli Schlachter 6de41161f1 Ignore size hints on fullscreen windows
If a window is fullscreen it is supposed to cover the full screen. Obeying size
hints makes no sense in this case.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-07-21 17:51:47 +02:00
Uli Schlachter 312094ace3 Avoid some flickering when a new window opens
A new window is by default above all other windows. This means that when we map
it and then *later* move it to the correct place in the stacking order (thanks
to lazy restacking), the window on the top of the stack has to redraw itself.

I noticed this via naughty notifies redrawing themselves after opening a browser
window.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-07-18 14:35:15 +02:00
Uli Schlachter 985bafaf84 Add all managed client windows to the safe set
When an application loses its connection to the X11 server, all the windows in
its save-set are saved by reparenting them back to their closest ancestor. Also,
to they are unconditionally mapped. This second property is exactly what we
need: All windows should be in mapped state, else the next window manager which
starts up won't be managing them.

This should fix all bugs where clients where lost due to a restart, yay! :)

Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-07-14 21:39:26 +02: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
Uli Schlachter 33e209dd83 Re-add lazy banning
This kind-of-reverts 058dbab828.

If banning_refresh() is called, only the lua events that it generated before are
now generated (the unfocus event). The actual mapping and unmapping of X11
windows is defered until the end of the main loop via a new per-screen
need_lazy_banning flag.

Signed-off-by: Uli Schlachter <psychon@znc.in>
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-09-28 14:04:59 +02:00
Uli Schlachter 9a56a3ad4b Add client_ban_unfocus
client_ban_unfocus() generates the unfocus events that client_ban() would
generate, but it doesn't do the actual banning.

Signed-off-by: Uli Schlachter <psychon@znc.in>
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-09-28 14:01:04 +02:00
Julien Danjou e4df381c3e client: emit more signals on manage
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-09-22 15:52:06 +02:00
Julien Danjou c5acc8f613 client: remove banning_refresh (FS#631)
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-09-21 15:01:36 +02:00
Julien Danjou 91b4611c94 client: emit geometry signal
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-09-18 11:31:31 +02:00
Julien Danjou b94a32c281 client: emit x,y,width,height signal on size changes
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-09-08 16:09:47 +02:00
Julien Danjou 97d82d8517 client: fix machine memory leak
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-09-08 11:21:47 +02:00
Cedric GESTES 1b007151e4 client: check for nil geometry
Signed-off-by: Cedric GESTES <ctaf42@gmail.com>
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-09-04 13:59:36 +02:00
Brian Gianforcaro 3145e3145e Grammar/spelling corrections in comments and docs.
Signed-off-by: Brian Gianforcaro <b.gianfo@gmail.com>
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-08-31 10:39:36 +02:00
Julien Danjou 17759578fa client: merge lower code
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-08-28 17:53:48 +02:00
Julien Danjou 3a1cbd6e35 client: emit property::workarea on events if client has strut
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-08-28 17:49:28 +02:00
Julien Danjou db10f783a6 client: return nil if client is not attached to a screen yet
Can happen with the "new" class signal.

Signed-off-by: Julien Danjou <julien@danjou.info>
2009-08-27 10:56:56 +02:00
Brian Gianforcaro c9ec34e61e Fix doxygen generation warnings
Signed-off-by: Brian Gianforcaro <b.gianfo@gmail.com>
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-08-26 09:15:57 +02:00
Julien Danjou 1337129191 property: split _NET_WM_{ICON_,}NAME from WM_{ICON_,}NAME
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-08-25 16:39:10 +02:00
Julien Danjou 8b6917f11e client: update EWMH hints when changing skip_taskbar
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-08-25 11:18:19 +02:00
Julien Danjou 8632dcac82 client: fix hidden signal
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-08-25 10:05:26 +02:00
Julien Danjou e293a69982 screen: move the tagging on screen change to Lua
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-08-24 16:32:19 +02:00
Julien Danjou 876602ea91 titlebar: fix push
Titlebar are not stored inside client but inside global reference table.

Signed-off-by: Julien Danjou <julien@danjou.info>
2009-08-24 11:49:05 +02:00
Julien Danjou c862bf0534 property: use xcb_get_wm_protocols_from_reply
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-08-24 11:13:00 +02:00
Julien Danjou be1abfa28f Revert "client: fix has_proto iteration with newer XCB"
This reverts commit 9c785c40f6.
2009-08-24 11:13:00 +02:00
Julien Danjou 73a1011364 client, spawn: stop storing startup_id
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-08-24 10:35:12 +02:00
Julien Danjou e5048f72d5 property: macrotify all text property retrieval
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-08-24 10:26:48 +02:00
Julien Danjou a6c0d9398e property: use provided reply to get machine
This avoid a roundtrip when getting a property change event.

Signed-off-by: Julien Danjou <julien@danjou.info>
2009-08-22 15:05:29 +02:00
Julien Danjou 6e05e20664 client: emit property::role after setting value
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-08-21 23:30:07 +02:00
Julien Danjou 9c785c40f6 client: fix has_proto iteration with newer XCB
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-08-21 22:41:13 +02:00
Julien Danjou 69b4b2650d client: fix client signal emitting in set_icon
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-08-21 20:55:13 +02:00
Julien Danjou 8c8c260ceb client: check that screen is not NULL
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-08-21 15:30:48 +02:00
Julien Danjou 4d0a025f51 luaclass: add handling of {new,}index of missing properties (FS#584)
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-08-21 15:30:48 +02:00
Julien Danjou 90bca51390 client: disallow client border change when fullscreen
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-08-21 15:30:48 +02:00
Julien Danjou 5fe32859f7 screen: emit signals when workarea size changes
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-08-21 15:30:48 +02:00
Julien Danjou b249c67af9 strut: move table conversion to luaA_tostrut()
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-08-21 15:30:47 +02:00
Julien Danjou c57bef8332 ewmh: change ewmh_update_client_strut() to ewmh_update_strut()
It takes window + strut as argument rather than a client.

Signed-off-by: Julien Danjou <julien@danjou.info>
2009-08-21 15:30:47 +02:00