Mercurial > emacs
comparison src/xfns.c @ 59102:0096c58ce34a
* xmenu.c (popup_get_selection): Pop down on C-g.
(set_frame_menubar): Install translations for Lucid/Motif/Lesstif that
pops down menu on C-g.
(xdialog_show): If dialog popped down and no button in the dialog was
pushed, call Fsignal to quit.
(xmenu_show): In no toolkit version, if menu returns NO_SELECT call
Fsignal to quit.
* xfns.c (Fx_file_dialog): Motif/Lesstif version: Pop down on C-g.
* gtkutil.c (xg_initialize): Install bindings for C-g so that
dialogs and menus pop down.
author | Jan Djärv <jan.h.d@swipnet.se> |
---|---|
date | Mon, 27 Dec 2004 15:24:12 +0000 |
parents | 86fddd350b35 |
children | 97d17acaf4e7 223c12363c0c 95879cc1ed20 |
comparison
equal
deleted
inserted
replaced
59101:8aef5660523e | 59102:0096c58ce34a |
---|---|
5241 while (result == 0) | 5241 while (result == 0) |
5242 { | 5242 { |
5243 XEvent event; | 5243 XEvent event; |
5244 x_menu_wait_for_event (0); | 5244 x_menu_wait_for_event (0); |
5245 XtAppNextEvent (Xt_app_con, &event); | 5245 XtAppNextEvent (Xt_app_con, &event); |
5246 if (event.type == KeyPress | |
5247 && FRAME_X_DISPLAY (f) == event.xkey.display) | |
5248 { | |
5249 KeySym keysym = XLookupKeysym (&event.xkey, 0); | |
5250 | |
5251 /* Pop down on C-g. */ | |
5252 if (keysym == XK_g && (event.xkey.state & ControlMask) != 0) | |
5253 XtUnmanageChild (dialog); | |
5254 } | |
5255 | |
5246 (void) x_dispatch_event (&event, FRAME_X_DISPLAY (f)); | 5256 (void) x_dispatch_event (&event, FRAME_X_DISPLAY (f)); |
5247 } | 5257 } |
5248 | 5258 |
5249 /* Get the result. */ | 5259 /* Get the result. */ |
5250 if (result == XmCR_OK) | 5260 if (result == XmCR_OK) |