From 196ac78ce159aaeb675c57e8cabb5747cbba3713 Mon Sep 17 00:00:00 2001 From: Richard M. Stallman Date: Sat, 4 Jun 2005 18:09:16 +0000 Subject: (popup_get_selection): Click not in menu deactivates menu. --- src/xmenu.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/xmenu.c') diff --git a/src/xmenu.c b/src/xmenu.c index 6f758d12fc7..6e3a21604c1 100644 --- a/src/xmenu.c +++ b/src/xmenu.c @@ -1235,6 +1235,10 @@ popup_get_selection (initial_event, dpyinfo, id, do_timers) if (event.type == ButtonRelease && dpyinfo->display == event.xbutton.display) { + /* If the click is not on the menu, deactivate the menu. */ + if (x_any_window_to_frame (dpyinfo, event.xexpose.window)) + popup_activated_flag = 0; + dpyinfo->grabbed &= ~(1 << event.xbutton.button); #ifdef USE_MOTIF /* Pretending that the event came from a Btn1Down seems the only way to convince Motif to -- cgit v1.2.1 From 1ca1f3f6c9c3734066ffd000bbc8ba9fcd1f1b89 Mon Sep 17 00:00:00 2001 From: Richard M. Stallman Date: Mon, 6 Jun 2005 12:56:53 +0000 Subject: (popup_get_selection): Undo previous change. --- src/xmenu.c | 4 ---- 1 file changed, 4 deletions(-) (limited to 'src/xmenu.c') diff --git a/src/xmenu.c b/src/xmenu.c index 6e3a21604c1..6f758d12fc7 100644 --- a/src/xmenu.c +++ b/src/xmenu.c @@ -1235,10 +1235,6 @@ popup_get_selection (initial_event, dpyinfo, id, do_timers) if (event.type == ButtonRelease && dpyinfo->display == event.xbutton.display) { - /* If the click is not on the menu, deactivate the menu. */ - if (x_any_window_to_frame (dpyinfo, event.xexpose.window)) - popup_activated_flag = 0; - dpyinfo->grabbed &= ~(1 << event.xbutton.button); #ifdef USE_MOTIF /* Pretending that the event came from a Btn1Down seems the only way to convince Motif to -- cgit v1.2.1 From 89f2614d96b5cf84f01c4903652a6a2b5b23d3d3 Mon Sep 17 00:00:00 2001 From: Kim F. Storm Date: Wed, 8 Jun 2005 22:33:36 +0000 Subject: * composite.c (compose_chars_in_text): * eval.c (do_autoload): * macmenu.c (set_frame_menubar): * process.c (read_process_output, exec_sentinel): * xmenu.c (set_frame_menubar): * xdisp.c (prepare_menu_bars, update_menu_bar, update_tool_bar): * w32menu.c (set_frame_menubar): Use record_unwind_save_match_data. Rename restore_match_data to restore_search_regs. --- src/xmenu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/xmenu.c') diff --git a/src/xmenu.c b/src/xmenu.c index 6f758d12fc7..16d4e0029cd 100644 --- a/src/xmenu.c +++ b/src/xmenu.c @@ -2030,7 +2030,7 @@ set_frame_menubar (f, first_time, deep_p) because it is not reentrant. */ specbind (Qdebug_on_next_call, Qnil); - record_unwind_protect (Fset_match_data, Fmatch_data (Qnil, Qnil)); + record_unwind_save_match_data (); record_unwind_protect (unuse_menu_items, Qnil); if (NILP (Voverriding_local_map_menu_flag)) { -- cgit v1.2.1