comparison src/term.c @ 83370:5272862a4865

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
author Karoly Lorentey <lorentey@elte.hu>
date Sun, 11 Sep 2005 03:15:42 +0000
parents 532e0a9335a9
children 7a3090aca393
comparison
equal deleted inserted replaced
83369:d2e0850b17f2 83370:5272862a4865
82 82
83 static void turn_on_face P_ ((struct frame *, int face_id)); 83 static void turn_on_face P_ ((struct frame *, int face_id));
84 static void turn_off_face P_ ((struct frame *, int face_id)); 84 static void turn_off_face P_ ((struct frame *, int face_id));
85 static void tty_show_cursor P_ ((struct tty_display_info *)); 85 static void tty_show_cursor P_ ((struct tty_display_info *));
86 static void tty_hide_cursor P_ ((struct tty_display_info *)); 86 static void tty_hide_cursor P_ ((struct tty_display_info *));
87
88 static struct device *get_tty_device (Lisp_Object device);
89 87
90 void delete_initial_device P_ ((struct device *)); 88 void delete_initial_device P_ ((struct device *));
91 void create_tty_output P_ ((struct frame *)); 89 void create_tty_output P_ ((struct frame *));
92 void delete_tty_output P_ ((struct frame *)); 90 void delete_tty_output P_ ((struct frame *));
93 91
2162 return result; 2160 return result;
2163 } 2161 }
2164 2162
2165 /* Return the tty display object specified by DEVICE. */ 2163 /* Return the tty display object specified by DEVICE. */
2166 2164
2167 static struct device * 2165 struct device *
2168 get_tty_device (Lisp_Object device) 2166 get_tty_device (Lisp_Object terminal)
2169 { 2167 {
2170 struct device *d = get_device (device, 0); 2168 struct device *d = get_device (terminal, 0);
2171 2169
2172 if (d && d->type == output_initial) 2170 if (d && d->type == output_initial)
2173 d = NULL; 2171 d = NULL;
2174 2172
2175 if (d && d->type != output_termcap) 2173 if (d && d->type != output_termcap)
2176 error ("Device %d is not a termcap display device", d->id); 2174 error ("Device %d is not a termcap display device", d->id);