]> Dogcows Code - chaz/openbox/blobdiff - openbox/event.c
don't menu menus jump around at all anymore. open them on screen in the first place
[chaz/openbox] / openbox / event.c
index b57037829f35a88fdd76419b18c602c6aeda25a1..75cf5d2e6f3471f4ea0e2b59051719285e083568 100644 (file)
@@ -329,7 +329,8 @@ static gboolean wanted_focusevent(XEvent *e)
 
         if (win == RootWindow(ob_display, ob_screen)) {
             /* This means focus reverted off of a client */
-            if (detail == NotifyPointerRoot || detail == NotifyDetailNone)
+            if (detail == NotifyPointerRoot || detail == NotifyDetailNone ||
+                detail == NotifyInferior)
                 return TRUE;
             else
                 return FALSE;
@@ -688,7 +689,8 @@ static void event_handle_client(ObClient *client, XEvent *e)
         } else if (ce.xfocus.detail == NotifyInferior) {
             ob_debug("Focus went to parent\n");
             /* Focus has been reverted to parent, which is our frame window,
-               so fall back to something other than the window which had it. */
+               or the root window, so fall back to something other than the
+               window which had it. */
             focus_fallback(FALSE);
         } else {
             /* Focus did move, so process the FocusIn event */
@@ -906,7 +908,10 @@ static void event_handle_client(ObClient *client, XEvent *e)
         }
         break;
     case UnmapNotify:
-        ob_debug("UnmapNotify for window 0x%x\n", client->window);
+        ob_debug("UnmapNotify for window 0x%x eventwin 0x%x sendevent %d "
+                 "ignores left %d\n",
+                 client->window, e->xunmap.event, e->xunmap.from_configure,
+                 client->ignore_unmaps);
         if (client->ignore_unmaps) {
             client->ignore_unmaps--;
             break;
@@ -932,6 +937,7 @@ static void event_handle_client(ObClient *client, XEvent *e)
            X server to deal with after we unmanage the window */
         XPutBackEvent(ob_display, e);
      
+        ob_debug("ReparentNotify for window 0x%x\n", client->window);
         client_unmanage(client);
         break;
     case MapRequest:
@@ -1257,10 +1263,11 @@ static void event_handle_menu(XEvent *ev)
     case MotionNotify:
         if ((f = menu_frame_under(ev->xmotion.x_root,
                                   ev->xmotion.y_root))) {
-            menu_frame_move_on_screen(f);
             if ((e = menu_entry_frame_under(ev->xmotion.x_root,
-                                            ev->xmotion.y_root)))
+                                            ev->xmotion.y_root))) {
+                /* XXX menu_frame_entry_move_on_screen(f); */
                 menu_frame_select(f, e);
+            }
         }
         {
             ObMenuFrame *a;
This page took 0.024968 seconds and 4 git commands to generate.