aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJim Blandy1992-02-06 02:09:14 +0000
committerJim Blandy1992-02-06 02:09:14 +0000
commitbc93c0971894741c726bd7921a9ad6c5441c4a3d (patch)
tree5e1c947bdf68fb9fafe6771518545a5e92c85166 /src
parent77d78be1714a34f0225850fadb997ca5fa80fe99 (diff)
downloademacs-bc93c0971894741c726bd7921a9ad6c5441c4a3d.tar.gz
emacs-bc93c0971894741c726bd7921a9ad6c5441c4a3d.zip
*** empty log message ***
Diffstat (limited to 'src')
-rw-r--r--src/frame.c44
1 files changed, 30 insertions, 14 deletions
diff --git a/src/frame.c b/src/frame.c
index 67c73950505..675407ba8ff 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -32,6 +32,7 @@ Lisp_Object Vscreen_list;
32Lisp_Object Vterminal_screen; 32Lisp_Object Vterminal_screen;
33Lisp_Object Vdefault_minibuffer_screen; 33Lisp_Object Vdefault_minibuffer_screen;
34Lisp_Object Vdefault_screen_alist; 34Lisp_Object Vdefault_screen_alist;
35Lisp_Object Qminibuffer;
35 36
36/* A screen which is not just a minibuffer, or 0 if there are no 37/* A screen which is not just a minibuffer, or 0 if there are no
37 such screens. This is usually the most recent such screen that 38 such screens. This is usually the most recent such screen that
@@ -288,7 +289,7 @@ focus on that screen.")
288 289
289#ifdef HAVE_X_WINDOWS 290#ifdef HAVE_X_WINDOWS
290#ifdef MULTI_SCREEN 291#ifdef MULTI_SCREEN
291 if (XSCREEN (screen)->output_method == output_x_window 292 if (SCREEN_IS_X (XSCREEN (screen))
292 && NILP (no_enter)) 293 && NILP (no_enter))
293 { 294 {
294 Ffocus_screen (screen); 295 Ffocus_screen (screen);
@@ -521,7 +522,7 @@ A screen may not be deleted if its minibuffer is used by other screens.")
521 s->display.nothing = 0; 522 s->display.nothing = 0;
522 523
523#ifdef HAVE_X_WINDOWS 524#ifdef HAVE_X_WINDOWS
524 if (s->output_method == output_x_window) 525 if (SCREEN_IS_X (s))
525 x_destroy_window (s, displ); 526 x_destroy_window (s, displ);
526#endif 527#endif
527 528
@@ -580,7 +581,7 @@ WARNING: If you use this under X, you should do unfocus-screen afterwards.")
580 CHECK_NUMBER (y, 1); 581 CHECK_NUMBER (y, 1);
581 582
582#ifdef HAVE_X_WINDOWS 583#ifdef HAVE_X_WINDOWS
583 if (XSCREEN (screen)->output_method == output_x_window) 584 if (SCREEN_IS_X (XSCREEN (screen)))
584 /* Warping the mouse will cause enternotify and focus events. */ 585 /* Warping the mouse will cause enternotify and focus events. */
585 x_set_mouse_position (XSCREEN (screen), x, y); 586 x_set_mouse_position (XSCREEN (screen), x, y);
586#endif 587#endif
@@ -651,7 +652,7 @@ Also raises the screen so that nothing obscures it.")
651{ 652{
652 CHECK_LIVE_SCREEN (screen, 0); 653 CHECK_LIVE_SCREEN (screen, 0);
653 654
654 if (XSCREEN (screen)->output_method == output_x_window) 655 if (SCREEN_IS_X (XSCREEN (screen)))
655 x_make_screen_visible (XSCREEN (screen)); 656 x_make_screen_visible (XSCREEN (screen));
656 657
657 return screen; 658 return screen;
@@ -665,7 +666,7 @@ DEFUN ("make-screen-invisible", Fmake_screen_invisible, Smake_screen_invisible,
665{ 666{
666 CHECK_LIVE_SCREEN (screen, 0); 667 CHECK_LIVE_SCREEN (screen, 0);
667 668
668 if (XSCREEN (screen)->output_method == output_x_window) 669 if (SCREEN_IS_X (XSCREEN (screen)))
669 x_make_screen_invisible (XSCREEN (screen)); 670 x_make_screen_invisible (XSCREEN (screen));
670 671
671 return Qnil; 672 return Qnil;
@@ -679,7 +680,7 @@ DEFUN ("iconify-screen", Ficonify_screen, Siconify_screen,
679{ 680{
680 CHECK_LIVE_SCREEN (screen, 0); 681 CHECK_LIVE_SCREEN (screen, 0);
681 682
682 if (XSCREEN (screen)->output_method == output_x_window) 683 if (SCREEN_IS_X (XSCREEN (screen)))
683 x_iconify_screen (XSCREEN (screen)); 684 x_iconify_screen (XSCREEN (screen));
684 685
685 return Qnil; 686 return Qnil;
@@ -693,7 +694,7 @@ DEFUN ("deiconify-screen", Fdeiconify_screen, Sdeiconify_screen,
693{ 694{
694 CHECK_LIVE_SCREEN (screen, 0); 695 CHECK_LIVE_SCREEN (screen, 0);
695 696
696 if (XSCREEN (screen)->output_method == output_x_window) 697 if (SCREEN_IS_X (XSCREEN (screen)))
697 x_make_screen_visible (XSCREEN (screen)); 698 x_make_screen_visible (XSCREEN (screen));
698 699
699 return screen; 700 return screen;
@@ -827,6 +828,19 @@ store_screen_param (s, prop, val)
827 s->param_alist = Fcons (Fcons (prop, val), s->param_alist); 828 s->param_alist = Fcons (Fcons (prop, val), s->param_alist);
828 else 829 else
829 Fsetcdr (tem, val); 830 Fsetcdr (tem, val);
831
832 if (EQ (prop, Qminibuffer)
833 && XTYPE (val) == Lisp_Window)
834 {
835 if (! MINI_WINDOW_P (XWINDOW (val)))
836 error ("Surrogate minibuffer windows must be minibuffer windows.");
837
838 if (SCREEN_HAS_MINIBUF (s) || SCREEN_MINIBUF_ONLY_P (s))
839 error ("Can't change surrogate minibuffer on screens with their own minibuffers.");
840
841 /* Install the chosen minibuffer window, with proper buffer. */
842 s->minibuffer_window = val;
843 }
830} 844}
831 845
832DEFUN ("screen-parameters", Fscreen_parameters, Sscreen_parameters, 0, 1, 0, 846DEFUN ("screen-parameters", Fscreen_parameters, Sscreen_parameters, 0, 1, 0,
@@ -858,10 +872,10 @@ The meaningful PARMs depend on the kind of screen.")
858 store_in_alist (&alist, "minibuffer", 872 store_in_alist (&alist, "minibuffer",
859 (SCREEN_HAS_MINIBUF (s) 873 (SCREEN_HAS_MINIBUF (s)
860 ? (SCREEN_MINIBUF_ONLY_P (s) ? intern ("only") : Qt) 874 ? (SCREEN_MINIBUF_ONLY_P (s) ? intern ("only") : Qt)
861 : Qnil)); 875 : SCREEN_MINIBUF_WINDOW (s)));
862 store_in_alist (&alist, "unsplittable", (s->no_split ? Qt : Qnil)); 876 store_in_alist (&alist, "unsplittable", (s->no_split ? Qt : Qnil));
863 877
864 if (s->output_method == output_x_window) 878 if (SCREEN_IS_X (s))
865 x_report_screen_params (s, &alist); 879 x_report_screen_params (s, &alist);
866 return alist; 880 return alist;
867} 881}
@@ -886,7 +900,7 @@ The meaningful PARMs depend on the kind of screen; undefined PARMs are ignored."
886 s = XSCREEN (screen); 900 s = XSCREEN (screen);
887 } 901 }
888 902
889 if (s->output_method == output_x_window) 903 if (SCREEN_IS_X (s))
890 for (tail = alist; !EQ (tail, Qnil); tail = Fcdr (tail)) 904 for (tail = alist; !EQ (tail, Qnil); tail = Fcdr (tail))
891 { 905 {
892 elt = Fcar (tail); 906 elt = Fcar (tail);
@@ -949,7 +963,7 @@ but that the idea of the actual height of the screen should not be changed.")
949 s = XSCREEN (screen); 963 s = XSCREEN (screen);
950 } 964 }
951 965
952 if (s->output_method == output_x_window) 966 if (SCREEN_IS_X (s))
953 { 967 {
954 if (XINT (rows) != s->width) 968 if (XINT (rows) != s->width)
955 x_set_window_size (s, s->width, XINT (rows)); 969 x_set_window_size (s, s->width, XINT (rows));
@@ -976,7 +990,7 @@ but that the idea of the actual width of the screen should not be changed.")
976 s = XSCREEN (screen); 990 s = XSCREEN (screen);
977 } 991 }
978 992
979 if (s->output_method == output_x_window) 993 if (SCREEN_IS_X (s))
980 { 994 {
981 if (XINT (cols) != s->width) 995 if (XINT (cols) != s->width)
982 x_set_window_size (s, XINT (cols), s->height); 996 x_set_window_size (s, XINT (cols), s->height);
@@ -999,7 +1013,7 @@ DEFUN ("set-screen-size", Fset_screen_size, Sset_screen_size, 3, 3, 0,
999 CHECK_NUMBER (rows, 1); 1013 CHECK_NUMBER (rows, 1);
1000 s = XSCREEN (screen); 1014 s = XSCREEN (screen);
1001 1015
1002 if (s->output_method == output_x_window) 1016 if (SCREEN_IS_X (s))
1003 { 1017 {
1004 if (XINT (rows) != s->height || XINT (cols) != s->width) 1018 if (XINT (rows) != s->height || XINT (cols) != s->width)
1005 x_set_window_size (s, XINT (cols), XINT (rows)); 1019 x_set_window_size (s, XINT (cols), XINT (rows));
@@ -1027,7 +1041,7 @@ off the screen.")
1027 CHECK_NUMBER (yoffset, 2); 1041 CHECK_NUMBER (yoffset, 2);
1028 s = XSCREEN (screen); 1042 s = XSCREEN (screen);
1029 1043
1030 if (s->output_method == output_x_window) 1044 if (SCREEN_IS_X (s))
1031 x_set_offset (s, XINT (xoffset), XINT (yoffset)); 1045 x_set_offset (s, XINT (xoffset), XINT (yoffset));
1032 1046
1033 return Qt; 1047 return Qt;
@@ -1092,9 +1106,11 @@ syms_of_screen ()
1092{ 1106{
1093 Qscreenp = intern ("screenp"); 1107 Qscreenp = intern ("screenp");
1094 Qlive_screen_p = intern ("live_screen_p"); 1108 Qlive_screen_p = intern ("live_screen_p");
1109 Qminibuffer = intern ("minibuffer");
1095 1110
1096 staticpro (&Qscreenp); 1111 staticpro (&Qscreenp);
1097 staticpro (&Qlive_screen_p); 1112 staticpro (&Qlive_screen_p);
1113 staticpro (&Qminibuffer);
1098 1114
1099 staticpro (&Vscreen_list); 1115 staticpro (&Vscreen_list);
1100 1116