aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog3
-rw-r--r--src/xmenu.c14
2 files changed, 12 insertions, 5 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 9e3c5e56559..8a267b46d14 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,8 @@
12005-01-07 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> 12005-01-07 Jan Dj,Ad(Brv <jan.h.d@swipnet.se>
2 2
3 * xmenu.c (create_and_show_popup_menu): Pass zero as button to
4 gtk_menu_popup if not for_click, so callbacks for the menu are called.
5
3 * gtkutil.c (xg_gtk_scroll_destroy, xg_create_scroll_bar) 6 * gtkutil.c (xg_gtk_scroll_destroy, xg_create_scroll_bar)
4 (xg_tool_bar_callback, xg_tool_bar_help_callback) 7 (xg_tool_bar_callback, xg_tool_bar_help_callback)
5 (update_frame_tool_bar): Cast to EMACS_INT to avoid compiler 8 (update_frame_tool_bar): Cast to EMACS_INT to avoid compiler
diff --git a/src/xmenu.c b/src/xmenu.c
index f9c2dc4bd1b..57f184e121f 100644
--- a/src/xmenu.c
+++ b/src/xmenu.c
@@ -2454,10 +2454,6 @@ create_and_show_popup_menu (f, first_wv, x, y, for_click)
2454 G_CALLBACK (menu_highlight_callback)); 2454 G_CALLBACK (menu_highlight_callback));
2455 xg_crazy_callback_abort = 0; 2455 xg_crazy_callback_abort = 0;
2456 2456
2457 for (i = 0; i < 5; i++)
2458 if (FRAME_X_DISPLAY_INFO (f)->grabbed & (1 << i))
2459 break;
2460
2461 if (! for_click) 2457 if (! for_click)
2462 { 2458 {
2463 /* Not invoked by a click. pop up at x/y. */ 2459 /* Not invoked by a click. pop up at x/y. */
@@ -2470,8 +2466,16 @@ create_and_show_popup_menu (f, first_wv, x, y, for_click)
2470 popup_x_y.x = x; 2466 popup_x_y.x = x;
2471 popup_x_y.y = y; 2467 popup_x_y.y = y;
2472 popup_x_y.f = f; 2468 popup_x_y.f = f;
2473 }
2474 2469
2470 i = 0; /* gtk_menu_popup needs this to be 0 for a non-button popup. */
2471 }
2472 else
2473 {
2474 for (i = 0; i < 5; i++)
2475 if (FRAME_X_DISPLAY_INFO (f)->grabbed & (1 << i))
2476 break;
2477 }
2478
2475 /* Display the menu. */ 2479 /* Display the menu. */
2476 gtk_widget_show_all (menu); 2480 gtk_widget_show_all (menu);
2477 gtk_menu_popup (GTK_MENU (menu), 0, 0, pos_func, &popup_x_y, i, 0); 2481 gtk_menu_popup (GTK_MENU (menu), 0, 0, pos_func, &popup_x_y, i, 0);