]> Dogcows Code - chaz/openbox/blobdiff - openbox/event.c
don't compare client pointers with random numbers
[chaz/openbox] / openbox / event.c
index 4d74284b41d85a7c4a3da482acc3360b48555a7f..6f819cc1f4c0838524d03fdd590d416e95fb3e23 100644 (file)
@@ -393,9 +393,6 @@ static Bool look_for_focusin(Display *d, XEvent *e, XPointer arg)
 static gboolean event_ignore(XEvent *e, ObClient *client)
 {
     switch(e->type) {
-    case EnterNotify:
-    case LeaveNotify:
-        return keyboard_interactively_grabbed();
     case FocusIn:
     case FocusOut:
         if (!wanted_focusevent(e)) {
@@ -593,9 +590,9 @@ static void event_process(const XEvent *ec, gpointer data)
                                          NULL, g_direct_equal, NULL);
 
                 if (e->type == ButtonPress || e->type == ButtonRelease ||
-                    e->type == MotionNotify)
+                    e->type == MotionNotify) {
                     mouse_event(client, e);
-                else if (e->type == KeyPress) {
+                else if (e->type == KeyPress) {
                     keyboard_event((focus_cycle_target ? focus_cycle_target :
                                     (focus_hilite ? focus_hilite : client)),
                                    e);
@@ -765,6 +762,8 @@ static void event_handle_client(ObClient *client, XEvent *e)
             frame_adjust_state(client->frame);
             break;
         case OB_FRAME_CONTEXT_FRAME:
+            if (keyboard_interactively_grabbed())
+                break;
             if (config_focus_follow && config_focus_delay)
                 ob_main_loop_timeout_remove_data(ob_main_loop,
                                                  focus_delay_func,
@@ -806,6 +805,8 @@ static void event_handle_client(ObClient *client, XEvent *e)
             frame_adjust_state(client->frame);
             break;
         case OB_FRAME_CONTEXT_FRAME:
+            if (keyboard_interactively_grabbed())
+                break;
             if (e->xcrossing.mode == NotifyGrab ||
                 e->xcrossing.mode == NotifyUngrab)
             {
@@ -1351,8 +1352,8 @@ static void focus_delay_dest(gpointer data)
 
 static gboolean focus_delay_cmp(gconstpointer d1, gconstpointer d2)
 {
-    const ObFocusDelayData *f1 = d1, *f2 = d2;
-    return f1->client == f2->client;
+    const ObFocusDelayData *f1 = d1;
+    return f1->client == d2;
 }
 
 static gboolean focus_delay_func(gpointer data)
This page took 0.020914 seconds and 4 git commands to generate.