comparison src/frame.c @ 83003:19208c3cbcc9

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
author Karoly Lorentey <lorentey@elte.hu>
date Sat, 03 Jan 2004 19:06:35 +0000
parents 77022bc45155
children 7900111db01c
comparison
equal deleted inserted replaced
83002:e654e1383970 83003:19208c3cbcc9
1576 f = SELECTED_FRAME (); 1576 f = SELECTED_FRAME ();
1577 x = y = Qnil; 1577 x = y = Qnil;
1578 1578
1579 #ifdef HAVE_MOUSE 1579 #ifdef HAVE_MOUSE
1580 /* It's okay for the hook to refrain from storing anything. */ 1580 /* It's okay for the hook to refrain from storing anything. */
1581 if (mouse_position_hook) 1581 if (FRAME_TERMCAP_P (f)
1582 && mouse_position_hook)
1582 (*mouse_position_hook) (&f, -1, 1583 (*mouse_position_hook) (&f, -1,
1583 &lispy_dummy, &party_dummy, 1584 &lispy_dummy, &party_dummy,
1584 &x, &y, 1585 &x, &y,
1585 &long_dummy); 1586 &long_dummy);
1586 #endif 1587 #endif
1850 CHECK_LIVE_FRAME (frame); 1851 CHECK_LIVE_FRAME (frame);
1851 1852
1852 /* Do like the documentation says. */ 1853 /* Do like the documentation says. */
1853 Fmake_frame_visible (frame); 1854 Fmake_frame_visible (frame);
1854 1855
1855 if (frame_raise_lower_hook) 1856 if (FRAME_TERMCAP_P (XFRAME (frame))
1857 && frame_raise_lower_hook)
1856 (*frame_raise_lower_hook) (XFRAME (frame), 1); 1858 (*frame_raise_lower_hook) (XFRAME (frame), 1);
1857 1859
1858 return Qnil; 1860 return Qnil;
1859 } 1861 }
1860 1862
1870 if (NILP (frame)) 1872 if (NILP (frame))
1871 frame = selected_frame; 1873 frame = selected_frame;
1872 1874
1873 CHECK_LIVE_FRAME (frame); 1875 CHECK_LIVE_FRAME (frame);
1874 1876
1875 if (frame_raise_lower_hook) 1877 if (FRAME_TERMCAP_P (XFRAME (frame))
1878 && frame_raise_lower_hook)
1876 (*frame_raise_lower_hook) (XFRAME (frame), 0); 1879 (*frame_raise_lower_hook) (XFRAME (frame), 0);
1877 1880
1878 return Qnil; 1881 return Qnil;
1879 } 1882 }
1880 1883
1915 if (! NILP (focus_frame)) 1918 if (! NILP (focus_frame))
1916 CHECK_LIVE_FRAME (focus_frame); 1919 CHECK_LIVE_FRAME (focus_frame);
1917 1920
1918 XFRAME (frame)->focus_frame = focus_frame; 1921 XFRAME (frame)->focus_frame = focus_frame;
1919 1922
1920 if (!FRAME_TERMCAP_P (XFRAME (frame)) && frame_rehighlight_hook) 1923 if (!FRAME_TERMCAP_P (XFRAME (frame))
1924 && frame_rehighlight_hook)
1921 (*frame_rehighlight_hook) (XFRAME (frame)); 1925 (*frame_rehighlight_hook) (XFRAME (frame));
1922 1926
1923 return Qnil; 1927 return Qnil;
1924 } 1928 }
1925 1929