client: Don't move clients around across restarts (FS#1159)
This kind of forces every client to have a window gravity of "static". This fixes most of the problem of clients moving around across restarts due to the titlebar. What is left is that they move due to the border width which should be handled in another patch. Also, another patch should make this honor the client's actual window gravity. Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
parent
0bdaed2704
commit
c3bca6ac34
|
@ -65,6 +65,12 @@ awesome_atexit(bool restart)
|
||||||
lua_pushboolean(globalconf.L, restart);
|
lua_pushboolean(globalconf.L, restart);
|
||||||
signal_object_emit(globalconf.L, &global_signals, "exit", 1);
|
signal_object_emit(globalconf.L, &global_signals, "exit", 1);
|
||||||
|
|
||||||
|
/* TODO: Reparent windows back to root window, placing them according to
|
||||||
|
* their window gravity. Right now we pretend to use static gravity and that
|
||||||
|
* works automatically thanks to xcb_change_save_set(). See
|
||||||
|
* titlebar_resize().
|
||||||
|
*/
|
||||||
|
|
||||||
a_dbus_cleanup();
|
a_dbus_cleanup();
|
||||||
|
|
||||||
systray_cleanup();
|
systray_cleanup();
|
||||||
|
|
|
@ -1558,16 +1558,23 @@ titlebar_resize(client_t *c, client_titlebar_t bar, int size)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/* Now resize the client (and titlebars!) suitably (the client without
|
/* Now resize the client (and titlebars!) suitably (the client without
|
||||||
* titlebars should keep its current size!) */
|
* titlebars should keep its current size!)
|
||||||
|
* TODO: I guess that this should honor the client's window gravity, right
|
||||||
|
* now we pretend to have static gravity. See awesome_atexit().
|
||||||
|
*/
|
||||||
area_t geometry = c->geometry;
|
area_t geometry = c->geometry;
|
||||||
int change = size - c->titlebar[bar].size;
|
int change = size - c->titlebar[bar].size;
|
||||||
switch (bar) {
|
switch (bar) {
|
||||||
case CLIENT_TITLEBAR_TOP:
|
case CLIENT_TITLEBAR_TOP:
|
||||||
|
geometry.y -= change;
|
||||||
|
/* fall through */;
|
||||||
case CLIENT_TITLEBAR_BOTTOM:
|
case CLIENT_TITLEBAR_BOTTOM:
|
||||||
geometry.height += change;
|
geometry.height += change;
|
||||||
break;
|
break;
|
||||||
case CLIENT_TITLEBAR_RIGHT:
|
|
||||||
case CLIENT_TITLEBAR_LEFT:
|
case CLIENT_TITLEBAR_LEFT:
|
||||||
|
geometry.x -= change;
|
||||||
|
/* fall through */;
|
||||||
|
case CLIENT_TITLEBAR_RIGHT:
|
||||||
geometry.width += change;
|
geometry.width += change;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|
Loading…
Reference in New Issue