]> Dogcows Code - chaz/openbox/blobdiff - openbox/event.c
get rid of the plate window
[chaz/openbox] / openbox / event.c
index ff2d560db7dccbdb0bf392bd741483a800038169..2ea7d30442a688f7bde0a2897169f5f2fbef6749 100644 (file)
@@ -306,7 +306,9 @@ static gboolean wanted_focusevent(XEvent *e, gboolean in_client_only)
             /* This means focus reverted off of a client */
             else if (detail == NotifyPointerRoot ||
                      detail == NotifyDetailNone ||
-                     detail == NotifyInferior)
+                     detail == NotifyInferior ||
+                     /* This means focus got here from another screen */
+                     detail == NotifyNonlinear)
                 return TRUE;
             else
                 return FALSE;
@@ -487,12 +489,20 @@ static void event_process(const XEvent *ec, gpointer data)
     } else if (e->type == FocusIn) {
         if (e->xfocus.detail == NotifyPointerRoot ||
             e->xfocus.detail == NotifyDetailNone ||
-            e->xfocus.detail == NotifyInferior)
+            e->xfocus.detail == NotifyInferior ||
+            e->xfocus.detail == NotifyNonlinear)
         {
             XEvent ce;
 
-            ob_debug_type(OB_DEBUG_FOCUS, "Focus went to pointer root/none or"
-                          " the frame window\n");
+            ob_debug_type(OB_DEBUG_FOCUS, "Focus went to root, "
+                          "pointer root/none or "
+                          "the frame window\n");
+
+            if (e->xfocus.detail == NotifyInferior ||
+                e->xfocus.detail == NotifyNonlinear)
+            {
+                focus_left_screen = FALSE;
+            }
 
             /* If another FocusIn is in the queue then don't fallback yet. This
                fixes the fun case of:
@@ -1161,7 +1171,7 @@ static void event_handle_client(ObClient *client, XEvent *e)
         break;
     case ReparentNotify:
         /* this is when the client is first taken captive in the frame */
-        if (e->xreparent.parent == client->frame->plate) break;
+        if (e->xreparent.parent == client->frame->window) break;
 
         /*
           This event is quite rare and is usually handled in unmapHandler.
@@ -1430,8 +1440,7 @@ static void event_handle_client(ObClient *client, XEvent *e)
         if (msgtype == XA_WM_NORMAL_HINTS) {
             client_update_normal_hints(client);
             /* normal hints can make a window non-resizable */
-            client_setup_decor_and_functions(client);
-            client_reconfigure(client);
+            client_setup_decor_and_functions(client, TRUE);
         } else if (msgtype == XA_WM_HINTS) {
             client_update_wmhints(client);
         } else if (msgtype == XA_WM_TRANSIENT_FOR) {
@@ -1439,8 +1448,7 @@ static void event_handle_client(ObClient *client, XEvent *e)
             client_get_type_and_transientness(client);
             /* type may have changed, so update the layer */
             client_calc_layer(client);
-            client_setup_decor_and_functions(client);
-            client_reconfigure(client);
+            client_setup_decor_and_functions(client, TRUE);
         } else if (msgtype == prop_atoms.net_wm_name ||
                    msgtype == prop_atoms.wm_name ||
                    msgtype == prop_atoms.net_wm_icon_name ||
@@ -1448,8 +1456,7 @@ static void event_handle_client(ObClient *client, XEvent *e)
             client_update_title(client);
         } else if (msgtype == prop_atoms.wm_protocols) {
             client_update_protocols(client);
-            client_setup_decor_and_functions(client);
-            client_reconfigure(client);
+            client_setup_decor_and_functions(client, TRUE);
         }
         else if (msgtype == prop_atoms.net_wm_strut) {
             client_update_strut(client);
This page took 0.021895 seconds and 4 git commands to generate.