set only one client, the top client, as the focused client on restarts
authorMike Blumenkrantz <zmike@samsung.com>
Thu, 23 Jan 2014 18:26:35 +0000 (13:26 -0500)
committerMike Blumenkrantz <zmike@samsung.com>
Thu, 23 Jan 2014 18:26:35 +0000 (13:26 -0500)
with this, stacking and focus should be perfectly preserved across e restarts

src/bin/e_comp_x.c

index 9f06dd2..4089d5a 100644 (file)
@@ -4970,6 +4970,17 @@ _e_comp_x_setup(E_Comp *c, Ecore_X_Window root, int w, int h)
    c->pointer->color = c->pointer->e_cursor && ecore_x_cursor_color_supported_get();
    _e_comp_x_manage_windows(c);
 
+   {
+      E_Client *ec;
+
+      E_CLIENT_REVERSE_FOREACH(c, ec)
+        if (!e_client_util_ignored_get(ec))
+          {
+             ec->want_focus = ec->take_focus = 1;
+             break;
+          }
+   }
+
    return !!c->bg_blank_object;
 }