mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-28 08:11:05 -08:00
* xmenu.c (create_and_show_popup_menu): Pass zero as button to
gtk_menu_popup if not for_click, so callbacks for the menu are called.
This commit is contained in:
parent
9abb41ebcb
commit
9b85e63d34
2 changed files with 12 additions and 5 deletions
|
|
@ -1,5 +1,8 @@
|
|||
2005-01-07 Jan Dj,Ad(Brv <jan.h.d@swipnet.se>
|
||||
|
||||
* xmenu.c (create_and_show_popup_menu): Pass zero as button to
|
||||
gtk_menu_popup if not for_click, so callbacks for the menu are called.
|
||||
|
||||
* gtkutil.c (xg_gtk_scroll_destroy, xg_create_scroll_bar)
|
||||
(xg_tool_bar_callback, xg_tool_bar_help_callback)
|
||||
(update_frame_tool_bar): Cast to EMACS_INT to avoid compiler
|
||||
|
|
|
|||
14
src/xmenu.c
14
src/xmenu.c
|
|
@ -2454,10 +2454,6 @@ create_and_show_popup_menu (f, first_wv, x, y, for_click)
|
|||
G_CALLBACK (menu_highlight_callback));
|
||||
xg_crazy_callback_abort = 0;
|
||||
|
||||
for (i = 0; i < 5; i++)
|
||||
if (FRAME_X_DISPLAY_INFO (f)->grabbed & (1 << i))
|
||||
break;
|
||||
|
||||
if (! for_click)
|
||||
{
|
||||
/* 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)
|
|||
popup_x_y.x = x;
|
||||
popup_x_y.y = y;
|
||||
popup_x_y.f = f;
|
||||
}
|
||||
|
||||
i = 0; /* gtk_menu_popup needs this to be 0 for a non-button popup. */
|
||||
}
|
||||
else
|
||||
{
|
||||
for (i = 0; i < 5; i++)
|
||||
if (FRAME_X_DISPLAY_INFO (f)->grabbed & (1 << i))
|
||||
break;
|
||||
}
|
||||
|
||||
/* Display the menu. */
|
||||
gtk_widget_show_all (menu);
|
||||
gtk_menu_popup (GTK_MENU (menu), 0, 0, pos_func, &popup_x_y, i, 0);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue