/[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.276 by jhd, Mon Dec 27 20:34:03 2004 UTC revision 1.277 by jhd, Mon Dec 27 20:56:56 2004 UTC
# Line 116  extern XtAppContext Xt_app_con; Line 116  extern XtAppContext Xt_app_con;
116    
117  static Lisp_Object xdialog_show P_ ((FRAME_PTR, int, Lisp_Object, char **));  static Lisp_Object xdialog_show P_ ((FRAME_PTR, int, Lisp_Object, char **));
118  static void popup_get_selection P_ ((XEvent *, struct x_display_info *,  static void popup_get_selection P_ ((XEvent *, struct x_display_info *,
119                                       LWLIB_ID, int, int));                                       LWLIB_ID, int));
120    
121  /* Define HAVE_BOXES if menus can handle radio and toggle buttons.  */  /* Define HAVE_BOXES if menus can handle radio and toggle buttons.  */
122    
# Line 1186  x_menu_wait_for_event (void *data) Line 1186  x_menu_wait_for_event (void *data)
1186     popped down (deactivated).  This is used for x-popup-menu     popped down (deactivated).  This is used for x-popup-menu
1187     and x-popup-dialog; it is not used for the menu bar.     and x-popup-dialog; it is not used for the menu bar.
1188    
    If DOWN_ON_KEYPRESS is nonzero, pop down if a key is pressed.  
   
1189     NOTE: All calls to popup_get_selection should be protected     NOTE: All calls to popup_get_selection should be protected
1190     with BLOCK_INPUT, UNBLOCK_INPUT wrappers.  */     with BLOCK_INPUT, UNBLOCK_INPUT wrappers.  */
1191    
1192  static void  static void
1193  popup_get_selection (initial_event, dpyinfo, id, do_timers, down_on_keypress)  popup_get_selection (initial_event, dpyinfo, id, do_timers)
1194       XEvent *initial_event;       XEvent *initial_event;
1195       struct x_display_info *dpyinfo;       struct x_display_info *dpyinfo;
1196       LWLIB_ID id;       LWLIB_ID id;
1197       int do_timers;       int do_timers;
      int down_on_keypress;  
1198  {  {
1199    XEvent event;    XEvent event;
1200    
# Line 1234  popup_get_selection (initial_event, dpyi Line 1231  popup_get_selection (initial_event, dpyi
1231          }          }
1232        /* Pop down on C-g and Escape.  */        /* Pop down on C-g and Escape.  */
1233        else if (event.type == KeyPress        else if (event.type == KeyPress
                && down_on_keypress  
1234                 && dpyinfo->display == event.xbutton.display)                 && dpyinfo->display == event.xbutton.display)
1235          {          {
1236            KeySym keysym = XLookupKeysym (&event.xkey, 0);            KeySym keysym = XLookupKeysym (&event.xkey, 0);
# Line 2599  create_and_show_popup_menu (f, first_wv, Line 2595  create_and_show_popup_menu (f, first_wv,
2595                                    make_number (menu_id & ~(-1 << (fact)))));                                    make_number (menu_id & ~(-1 << (fact)))));
2596    
2597      /* Process events that apply to the menu.  */      /* Process events that apply to the menu.  */
2598      popup_get_selection ((XEvent *) 0, FRAME_X_DISPLAY_INFO (f), menu_id, 1, 0);      popup_get_selection ((XEvent *) 0, FRAME_X_DISPLAY_INFO (f), menu_id, 1);
2599    
2600      unbind_to (specpdl_count, Qnil);      unbind_to (specpdl_count, Qnil);
2601    }    }
# Line 2977  create_and_show_dialog (f, first_wv) Line 2973  create_and_show_dialog (f, first_wv)
2973                                    make_number (dialog_id & ~(-1 << (fact)))));                                    make_number (dialog_id & ~(-1 << (fact)))));
2974    
2975      popup_get_selection ((XEvent *) 0, FRAME_X_DISPLAY_INFO (f),      popup_get_selection ((XEvent *) 0, FRAME_X_DISPLAY_INFO (f),
2976                           dialog_id, 1, 1);                           dialog_id, 1);
2977    
2978      unbind_to (count, Qnil);      unbind_to (count, Qnil);
2979    }    }

Legend:
Removed from v.1.276  
changed lines
  Added in v.1.277

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