diff options
author | Karoly Lorentey <lorentey@elte.hu> | 2005-09-11 03:15:42 +0000 |
---|---|---|
committer | Karoly Lorentey <lorentey@elte.hu> | 2005-09-11 03:15:42 +0000 |
commit | 62af879c72eb791a0e0096ae2c739e8c2649d2fc (patch) | |
tree | a9693d099cfd030230b0ab688c2f6ad7114775ef /src/fns.c | |
parent | 6bac16160743017637d0a77399cd4530f454e74b (diff) | |
download | emacs-62af879c72eb791a0e0096ae2c739e8c2649d2fc.tar.gz emacs-62af879c72eb791a0e0096ae2c739e8c2649d2fc.tar.bz2 emacs-62af879c72eb791a0e0096ae2c739e8c2649d2fc.zip |
Fix crashes in xdialog_show (and other places) with xterm-mouse-mode.
* src/dispextern.h (get_tty_device): Declare.
* src/dispnew.c (Fsend_string_to_terminal): Add optional TERMINAL parameter.
* src/fns.c (Fy_or_n_p, Fyes_or_no_p): Don't try to open an X dialog on
tty terminals.
* src/term.c (get_tty_device): Remove static qualifier.
* src/xmenu.c (create_and_show_dialog, create_and_show_popup_menu)
(free_frame_menubar, mouse_position_for_popup, set_frame_menubar)
(update_frame_menubar, x_activate_menubar, xdialog_show, xmenu_show):
Abort when given a non-X frame.
* src/xmenu.c (Fx_popup_menu, Fx_popup_dialog): Throw an error when run
on a non-X frame.
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-410
Diffstat (limited to 'src/fns.c')
-rw-r--r-- | src/fns.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/fns.c b/src/fns.c index 3c23aef282e..987762a1f4f 100644 --- a/src/fns.c +++ b/src/fns.c @@ -3267,7 +3267,8 @@ is nil and `use-dialog-box' is non-nil. */) { #ifdef HAVE_MENUS - if ((NILP (last_nonmenu_event) || CONSP (last_nonmenu_event)) + if (FRAME_WINDOW_P (SELECTED_FRAME ()) + && (NILP (last_nonmenu_event) || CONSP (last_nonmenu_event)) && use_dialog_box && have_menus_p ()) { @@ -3398,7 +3399,8 @@ is nil, and `use-dialog-box' is non-nil. */) CHECK_STRING (prompt); #ifdef HAVE_MENUS - if ((NILP (last_nonmenu_event) || CONSP (last_nonmenu_event)) + if (FRAME_WINDOW_P (SELECTED_FRAME ()) + && (NILP (last_nonmenu_event) || CONSP (last_nonmenu_event)) && use_dialog_box && have_menus_p ()) { |