summaryrefslogtreecommitdiff
path: root/src/xmenu.c
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1994-10-20 06:39:00 +0000
committerRichard M. Stallman <rms@gnu.org>1994-10-20 06:39:00 +0000
commitd54dda981bdf93c3d16e13bf7f1e3f9da27bb9f5 (patch)
tree431321201d7099a2f1004430d990fa0a962e34b9 /src/xmenu.c
parentcee236e99d5f82f98bfcbbf5a993364c45cc87cc (diff)
downloademacs-d54dda981bdf93c3d16e13bf7f1e3f9da27bb9f5.tar.gz
(xdialog_show, xmenu_show): Use grabbed field instead of x_mouse_grabbed.
(xmenu_show): Use the screen in FRAME_X_DISPLAY_INFO, not the display's default screen.
Diffstat (limited to 'src/xmenu.c')
-rw-r--r--src/xmenu.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/xmenu.c b/src/xmenu.c
index fea869ebe60..e1ace610f9c 100644
--- a/src/xmenu.c
+++ b/src/xmenu.c
@@ -1507,8 +1507,6 @@ free_frame_menubar (f)
#ifdef USE_X_TOOLKIT
-extern unsigned int x_mouse_grabbed;
-
/* We need a unique id for each widget handled by the Lucid Widget
library. This includes the frame main windows, popup menu and
dialog box. */
@@ -1988,7 +1986,7 @@ xdialog_show (f, menubarp, keymaps, title, error)
That is not necessarily true, but the fiction leads to reasonable
results, and it is a pain to ask which are actually held now
or track this in the loop above. */
- x_mouse_grabbed = 0;
+ FRAME_X_DISPLAY_INFO (f)->grabbed = 0;
#endif
/* Unread any events that we got but did not handle. */
@@ -2224,9 +2222,9 @@ xmenu_show (f, x, y, menubarp, keymaps, title, error)
/* All set and ready to fly. */
XMenuRecompute (FRAME_X_DISPLAY (f), menu);
dispwidth = DisplayWidth (FRAME_X_DISPLAY (f),
- XDefaultScreen (FRAME_X_DISPLAY (f)));
+ FRAME_X_DISPLAY_INFO (f)->screen);
dispheight = DisplayHeight (FRAME_X_DISPLAY (f),
- XDefaultScreen (FRAME_X_DISPLAY (f)));
+ FRAME_X_DISPLAY_INFO (f)->screen);
x = min (x, dispwidth);
y = min (y, dispheight);
x = max (x, 1);
@@ -2308,7 +2306,7 @@ xmenu_show (f, x, y, menubarp, keymaps, title, error)
(The oldXMenu code doesn't track this info for us.)
That is not necessarily true, but the fiction leads to reasonable
results, and it is a pain to ask which are actually held now. */
- x_mouse_grabbed = 0;
+ FRAME_X_DISPLAY_INFO (f)->grabbed = 0;
#endif
return entry;