Commit 9b85e63d authored by Jan Djärv's avatar Jan Djärv
Browse files

* 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.
parent 9abb41eb
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
......
......@@ -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);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment