/[emacs]/emacs/src/xmenu.c
ViewVC logotype

Diff of /emacs/src/xmenu.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.278 by jhd, Fri Jan 7 20:50:46 2005 UTC revision 1.279 by jhd, Thu Feb 3 19:49:43 2005 UTC
# Line 1445  menu_highlight_callback (widget, id, cal Line 1445  menu_highlight_callback (widget, id, cal
1445  /* Find the menu selection and store it in the keyboard buffer.  /* Find the menu selection and store it in the keyboard buffer.
1446     F is the frame the menu is on.     F is the frame the menu is on.
1447     MENU_BAR_ITEMS_USED is the length of VECTOR.     MENU_BAR_ITEMS_USED is the length of VECTOR.
1448     VECTOR is an array of menu events for the whole menu.     VECTOR is an array of menu events for the whole menu.  */
1449   */  
1450  void  static void
1451  find_and_call_menu_selection (f, menu_bar_items_used, vector, client_data)  find_and_call_menu_selection (f, menu_bar_items_used, vector, client_data)
1452       FRAME_PTR f;       FRAME_PTR f;
1453       int menu_bar_items_used;       int menu_bar_items_used;
# Line 1464  find_and_call_menu_selection (f, menu_ba Line 1464  find_and_call_menu_selection (f, menu_ba
1464    prefix = Qnil;    prefix = Qnil;
1465    i = 0;    i = 0;
1466    
1467      while (gtk_events_pending ())
1468        gtk_main_iteration ();
1469    while (i < menu_bar_items_used)    while (i < menu_bar_items_used)
1470      {      {
1471        if (EQ (XVECTOR (vector)->contents[i], Qnil))        if (EQ (XVECTOR (vector)->contents[i], Qnil))
# Line 1554  menubar_selection_callback (widget, clie Line 1556  menubar_selection_callback (widget, clie
1556    if (! cb_data || ! cb_data->cl_data || ! cb_data->cl_data->f)    if (! cb_data || ! cb_data->cl_data || ! cb_data->cl_data->f)
1557      return;      return;
1558    
1559      /* When a menu is popped down, X generates a focus event (i.e. focus
1560         goes back to the frame below the menu).  Since GTK buffers events,
1561         we force it out here before the menu selection event.  Otherwise
1562         sit-for will exit at once if the focus event follows the menu selection
1563         event.  */
1564    
1565      BLOCK_INPUT;
1566      while (gtk_events_pending ())
1567        gtk_main_iteration ();
1568      UNBLOCK_INPUT;
1569    
1570    find_and_call_menu_selection (cb_data->cl_data->f,    find_and_call_menu_selection (cb_data->cl_data->f,
1571                                  cb_data->cl_data->menu_bar_items_used,                                  cb_data->cl_data->menu_bar_items_used,
1572                                  cb_data->cl_data->menu_bar_vector,                                  cb_data->cl_data->menu_bar_vector,

Legend:
Removed from v.1.278  
changed lines
  Added in v.1.279

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26