From f02480ab7ba2dd3529d252fa5dc5938d6fc32351 Mon Sep 17 00:00:00 2001 From: Karoly Lorentey Date: Sat, 3 Jan 2004 19:06:35 +0000 Subject: [PATCH] Fix more SEGV cases in frame.c src/frame.c (Fmouse_pixel_position, Fraise_frame, Flower_frame) (Fredirect_frame_focus): Don't do anything if the current frame is a termcap frame. git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-43 --- src/frame.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/frame.c b/src/frame.c index f2262f3a216..cc971edefc9 100644 --- a/src/frame.c +++ b/src/frame.c @@ -1578,7 +1578,8 @@ and nil for X and Y. */) #ifdef HAVE_MOUSE /* It's okay for the hook to refrain from storing anything. */ - if (mouse_position_hook) + if (FRAME_TERMCAP_P (f) + && mouse_position_hook) (*mouse_position_hook) (&f, -1, &lispy_dummy, &party_dummy, &x, &y, @@ -1852,7 +1853,8 @@ doesn't support multiple overlapping frames, this function does nothing. */) /* Do like the documentation says. */ Fmake_frame_visible (frame); - if (frame_raise_lower_hook) + if (FRAME_TERMCAP_P (XFRAME (frame)) + && frame_raise_lower_hook) (*frame_raise_lower_hook) (XFRAME (frame), 1); return Qnil; @@ -1872,7 +1874,8 @@ doesn't support multiple overlapping frames, this function does nothing. */) CHECK_LIVE_FRAME (frame); - if (frame_raise_lower_hook) + if (FRAME_TERMCAP_P (XFRAME (frame)) + && frame_raise_lower_hook) (*frame_raise_lower_hook) (XFRAME (frame), 0); return Qnil; @@ -1917,7 +1920,8 @@ The redirection lasts until `redirect-frame-focus' is called to change it. */) XFRAME (frame)->focus_frame = focus_frame; - if (!FRAME_TERMCAP_P (XFRAME (frame)) && frame_rehighlight_hook) + if (!FRAME_TERMCAP_P (XFRAME (frame)) + && frame_rehighlight_hook) (*frame_rehighlight_hook) (XFRAME (frame)); return Qnil;