[USE_X_TOOLKIT] (xmenu_show): Handle UnmapNotify events.
authorRichard M. Stallman <rms@gnu.org>
Sun, 17 Jul 1994 06:41:53 +0000 (06:41 +0000)
committerRichard M. Stallman <rms@gnu.org>
Sun, 17 Jul 1994 06:41:53 +0000 (06:41 +0000)
src/xmenu.c

index 8eb1c14..758b439 100644 (file)
@@ -1719,6 +1719,13 @@ xmenu_show (f, x, y, menubarp, keymaps, title, error)
              break;
            }
        }
+      else if (event.type == UnmapNotify)
+       {
+         /* If the menu disappears, there is no need to stay in the
+             loop.  */
+         if (event.xunmap.window == menu->core.window)
+           break;
+       }
 
       XtDispatchEvent (&event);
       if (queue_and_exit