This splits up client_getbywin() into two different functions. One of them finds
a client by its frame window, the other checks against the client's own window.
Signed-off-by: Uli Schlachter <psychon@znc.in>
Each window is now reparented under a window created by awesome. This window is
NOT visible, this commit should not cause any visible differences. Instead, this
is done to work around problems with X11.
The only alternative would be to ban windows by moving them offscreen which is
ugly in itself and breaks pagers. Doing it like this seems to be the better
solution.
Signed-off-by: Uli Schlachter <psychon@znc.in>
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>
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>
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>
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>
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>
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>
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>
When one sets a client to fullscreen, this is what currently happens:
- lua code: c.fullscreen = true
- The C code emits request::fullscreen without having touched the client's
fullscreen property yet (c.fullscreen is still false)
- awful.ewmh changes the client's geometry to fullscreen via c:geometry()
- This causes property::geometry to be emitted
- awful.layout reacts on this and causes the screen to be re-arranged, undoing
the fullscreen geometry set in awful.ewmh
- The C code for c.fullscreen = true continues and actually changes the client's
fullscreen flag
The result of this is that we get a client which thinks it is fullscreen'd
without actually being that.
Fix this by first changing the client's fullscreen property and then emitting
request::fullscreen. Same thing for maximized_{vertical,horizontal}.
Thanks to Jim Pryor for reporting this bug and helping reproducing it.
Signed-off-by: Uli Schlachter <psychon@znc.in>
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>