mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2025-02-06 20:49:33 +00:00
(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.
This commit is contained in:
parent
a9d77f1fb7
commit
e9a79fb23e
10
src/xmenu.c
10
src/xmenu.c
@ -1507,8 +1507,6 @@ free_frame_menubar (f)
|
|||||||
|
|
||||||
#ifdef USE_X_TOOLKIT
|
#ifdef USE_X_TOOLKIT
|
||||||
|
|
||||||
extern unsigned int x_mouse_grabbed;
|
|
||||||
|
|
||||||
/* We need a unique id for each widget handled by the Lucid Widget
|
/* We need a unique id for each widget handled by the Lucid Widget
|
||||||
library. This includes the frame main windows, popup menu and
|
library. This includes the frame main windows, popup menu and
|
||||||
dialog box. */
|
dialog box. */
|
||||||
@ -1988,7 +1986,7 @@ xdialog_show (f, menubarp, keymaps, title, error)
|
|||||||
That is not necessarily true, but the fiction leads to reasonable
|
That is not necessarily true, but the fiction leads to reasonable
|
||||||
results, and it is a pain to ask which are actually held now
|
results, and it is a pain to ask which are actually held now
|
||||||
or track this in the loop above. */
|
or track this in the loop above. */
|
||||||
x_mouse_grabbed = 0;
|
FRAME_X_DISPLAY_INFO (f)->grabbed = 0;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Unread any events that we got but did not handle. */
|
/* 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. */
|
/* All set and ready to fly. */
|
||||||
XMenuRecompute (FRAME_X_DISPLAY (f), menu);
|
XMenuRecompute (FRAME_X_DISPLAY (f), menu);
|
||||||
dispwidth = DisplayWidth (FRAME_X_DISPLAY (f),
|
dispwidth = DisplayWidth (FRAME_X_DISPLAY (f),
|
||||||
XDefaultScreen (FRAME_X_DISPLAY (f)));
|
FRAME_X_DISPLAY_INFO (f)->screen);
|
||||||
dispheight = DisplayHeight (FRAME_X_DISPLAY (f),
|
dispheight = DisplayHeight (FRAME_X_DISPLAY (f),
|
||||||
XDefaultScreen (FRAME_X_DISPLAY (f)));
|
FRAME_X_DISPLAY_INFO (f)->screen);
|
||||||
x = min (x, dispwidth);
|
x = min (x, dispwidth);
|
||||||
y = min (y, dispheight);
|
y = min (y, dispheight);
|
||||||
x = max (x, 1);
|
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.)
|
(The oldXMenu code doesn't track this info for us.)
|
||||||
That is not necessarily true, but the fiction leads to reasonable
|
That is not necessarily true, but the fiction leads to reasonable
|
||||||
results, and it is a pain to ask which are actually held now. */
|
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
|
#endif
|
||||||
|
|
||||||
return entry;
|
return entry;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user