]> Dogcows Code - chaz/openbox/blobdiff - openbox/event.c
fallback to transients' parents when possible.
[chaz/openbox] / openbox / event.c
index a75cd1ecb237db10883a5cc811d12dd6885c5fde..3a8f96b612be011e15681a0dd564b1979e5b6286 100644 (file)
@@ -289,7 +289,9 @@ void event_process(XEvent *e)
        event_lasttime = e->xcrossing.time;
         /* NotifyUngrab occurs when a mouse button is released and the event is
            caused, like when lowering a window */
-        if (e->xcrossing.mode == NotifyGrab) return;
+        if (e->xcrossing.mode == NotifyGrab ||
+            e->xcrossing.detail == NotifyInferior)
+            return;
        break;
     default:
         event_lasttime = CurrentTime;
@@ -368,8 +370,10 @@ static void event_handle_client(Client *client, XEvent *e)
     case FocusIn:
         focus_set_client(client);
     case FocusOut:
+#ifdef DEBUG_FOCUS
         g_message("Focus%s on client for %lx", (e->type==FocusIn?"In":"Out"),
                   client->window);
+#endif
         /* focus state can affect the stacking layer */
         client_calc_layer(client);
         engine_frame_adjust_focus(client->frame);
@@ -384,8 +388,13 @@ static void event_handle_client(Client *client, XEvent *e)
                                                      client);
                 focus_order[desktop] = g_list_prepend(focus_order[desktop],
                                                       client);
-            } else if (focus_follow)
+            } else if (focus_follow) {
+#ifdef DEBUG_FOCUS
+                g_message("EnterNotify on %lx, focusing window",
+                          client->window);
+#endif
                 client_focus(client);
+            }
         }
         break;
     case ConfigureRequest:
This page took 0.025667 seconds and 4 git commands to generate.