Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
a6d676d9
Commit
a6d676d9
authored
Mar 30, 2010
by
Chong Yidong
Browse files
* menu.c (Fx_popup_menu): Use last_event_timestamp (Bug#4930).
parent
b42da387
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
6 deletions
+16
-6
src/ChangeLog
src/ChangeLog
+4
-0
src/menu.c
src/menu.c
+12
-6
No files found.
src/ChangeLog
View file @
a6d676d9
2010-03-30 Bernhard Herzog <bh@intevation.de> (tiny change)
* menu.c (Fx_popup_menu): Use last_event_timestamp (Bug#4930).
2010-03-30 Jan Djärv <jan.h.d@swipnet.se>
* xdisp.c (note_mouse_highlight): Don't do highlight if pointer is
...
...
src/menu.c
View file @
a6d676d9
...
...
@@ -61,6 +61,10 @@ extern HMENU current_popup_menu;
#define HAVE_BOXES 1
#endif
/* The timestamp of the last input event Emacs received from the X server. */
/* Defined in keyboard.c. */
extern
unsigned
long
last_event_timestamp
;
extern
Lisp_Object
QCtoggle
,
QCradio
;
Lisp_Object
menu_items
;
...
...
@@ -1073,7 +1077,6 @@ no quit occurs and `x-popup-menu' returns nil. */)
int
keymaps
=
0
;
int
for_click
=
0
;
int
specpdl_count
=
SPECPDL_INDEX
();
Lisp_Object
timestamp
=
Qnil
;
struct
gcpro
gcpro1
;
if
(
NILP
(
position
))
...
...
@@ -1107,10 +1110,9 @@ no quit occurs and `x-popup-menu' returns nil. */)
for_click
=
1
;
tem
=
Fcar
(
Fcdr
(
position
));
/* EVENT_START (position) */
window
=
Fcar
(
tem
);
/* POSN_WINDOW (tem) */
tem
=
Fcdr
(
Fcdr
(
tem
));
x
=
Fcar
(
Fcar
(
tem
));
y
=
Fcdr
(
Fcar
(
tem
));
timestamp
=
Fcar
(
Fcdr
(
tem
));
tem
=
Fcar
(
Fcdr
(
Fcdr
(
tem
)));
/* POSN_WINDOW_POSN (tem) */
x
=
Fcar
(
tem
);
y
=
Fcdr
(
tem
);
}
/* If a click happens in an external tool bar or a detached
...
...
@@ -1318,9 +1320,13 @@ no quit occurs and `x-popup-menu' returns nil. */)
selection
=
ns_menu_show
(
f
,
xpos
,
ypos
,
for_click
,
keymaps
,
title
,
&
error_name
);
#else
/* MSDOS and X11 */
/* Assume last_event_timestamp is the timestamp of the button event.
Is this assumption ever violated? We can't use the timestamp
stored within POSITION because there the top bits from the actual
timestamp may be truncated away (Bug#4930). */
selection
=
xmenu_show
(
f
,
xpos
,
ypos
,
for_click
,
keymaps
,
title
,
&
error_name
,
INTEGERP
(
timestamp
)
?
XUINT
(
timestamp
)
:
0
)
;
last_event_
timestamp
);
#endif
UNBLOCK_INPUT
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment