$OpenBSD: patch-awesome_c,v 1.17 2016/03/07 11:33:59 dcoppa Exp $

commit 635223b5fe599d94de4ab44d27500041f121e081
Author: Uli Schlachter <psychon@znc.in>
Date:   Sun Jan 11 10:42:45 2015 +0100

Remove titlebars from clients during shutdown

This reparents all clients back to their proper position during shutdown, so
that their top-left corner is now where their titlebar's top-left corner was.
Hopefully, this fixes floating clients moving around across a restart.

Signed-off-by: Uli Schlachter <psychon@znc.in>

--- awesome.c.orig	Fri Jan 15 16:51:19 2016
+++ awesome.c	Mon Jan 18 09:47:55 2016
@@ -89,6 +89,13 @@ awesome_atexit(bool restart)
                         globalconf.screen->root,
                         AWESOME_CLIENT_ORDER, XCB_ATOM_WINDOW, 32, n, wins);
 
+    /* Move clients where we want them to be */
+    foreach(c, globalconf.clients)
+    {
+        xcb_reparent_window(globalconf.connection, (*c)->window, globalconf.screen->root,
+                (*c)->geometry.x, (*c)->geometry.y);
+    }
+
     a_dbus_cleanup();
 
     systray_cleanup();
