aboutsummaryrefslogtreecommitdiffstats
path: root/src/frame.c
diff options
context:
space:
mode:
authorPaul Eggert2011-04-15 00:48:51 -0700
committerPaul Eggert2011-04-15 00:48:51 -0700
commit4170f62f39edf1ff1e99aec9bfbfe7bbf10e7fc9 (patch)
treee993b231bb5555c9c961f5d0b20d90ac76f77bbd /src/frame.c
parent1963a2e0bb07cc8dee6d27f972f93d9cfd7c6b2d (diff)
parent49093f601b69d91126aefd328ee8f6bfeb797407 (diff)
downloademacs-4170f62f39edf1ff1e99aec9bfbfe7bbf10e7fc9.tar.gz
emacs-4170f62f39edf1ff1e99aec9bfbfe7bbf10e7fc9.zip
Merge from mainline.
Diffstat (limited to 'src/frame.c')
-rw-r--r--src/frame.c56
1 files changed, 21 insertions, 35 deletions
diff --git a/src/frame.c b/src/frame.c
index 1b6d36092ae..cafcd149503 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -69,10 +69,10 @@ Lisp_Object Qonly;
69Lisp_Object Qx, Qw32, Qmac, Qpc, Qns; 69Lisp_Object Qx, Qw32, Qmac, Qpc, Qns;
70Lisp_Object Qvisible; 70Lisp_Object Qvisible;
71Lisp_Object Qdisplay_type; 71Lisp_Object Qdisplay_type;
72Lisp_Object Qbackground_mode; 72static Lisp_Object Qbackground_mode;
73Lisp_Object Qnoelisp; 73Lisp_Object Qnoelisp;
74 74
75Lisp_Object Qx_frame_parameter; 75static Lisp_Object Qx_frame_parameter;
76Lisp_Object Qx_resource_name; 76Lisp_Object Qx_resource_name;
77Lisp_Object Qterminal; 77Lisp_Object Qterminal;
78Lisp_Object Qterminal_live_p; 78Lisp_Object Qterminal_live_p;
@@ -82,7 +82,7 @@ Lisp_Object Qterminal_live_p;
82Lisp_Object Qauto_raise, Qauto_lower; 82Lisp_Object Qauto_raise, Qauto_lower;
83Lisp_Object Qborder_color, Qborder_width; 83Lisp_Object Qborder_color, Qborder_width;
84Lisp_Object Qcursor_color, Qcursor_type; 84Lisp_Object Qcursor_color, Qcursor_type;
85Lisp_Object Qgeometry; /* Not used */ 85static Lisp_Object Qgeometry; /* Not used */
86Lisp_Object Qheight, Qwidth; 86Lisp_Object Qheight, Qwidth;
87Lisp_Object Qleft, Qright; 87Lisp_Object Qleft, Qright;
88Lisp_Object Qicon_left, Qicon_top, Qicon_type, Qicon_name; 88Lisp_Object Qicon_left, Qicon_top, Qicon_type, Qicon_name;
@@ -95,19 +95,20 @@ Lisp_Object Qvisibility;
95Lisp_Object Qscroll_bar_foreground, Qscroll_bar_background; 95Lisp_Object Qscroll_bar_foreground, Qscroll_bar_background;
96Lisp_Object Qscreen_gamma; 96Lisp_Object Qscreen_gamma;
97Lisp_Object Qline_spacing; 97Lisp_Object Qline_spacing;
98Lisp_Object Quser_position, Quser_size; 98static Lisp_Object Quser_position, Quser_size;
99Lisp_Object Qwait_for_wm; 99Lisp_Object Qwait_for_wm;
100Lisp_Object Qwindow_id; 100static Lisp_Object Qwindow_id;
101#ifdef HAVE_X_WINDOWS 101#ifdef HAVE_X_WINDOWS
102Lisp_Object Qouter_window_id; 102static Lisp_Object Qouter_window_id;
103#endif 103#endif
104Lisp_Object Qparent_id; 104Lisp_Object Qparent_id;
105Lisp_Object Qtitle, Qname; 105Lisp_Object Qtitle, Qname;
106Lisp_Object Qexplicit_name; 106static Lisp_Object Qexplicit_name;
107Lisp_Object Qunsplittable; 107Lisp_Object Qunsplittable;
108Lisp_Object Qmenu_bar_lines, Qtool_bar_lines, Qtool_bar_position; 108Lisp_Object Qmenu_bar_lines, Qtool_bar_lines, Qtool_bar_position;
109Lisp_Object Qleft_fringe, Qright_fringe; 109Lisp_Object Qleft_fringe, Qright_fringe;
110Lisp_Object Qbuffer_predicate, Qbuffer_list, Qburied_buffer_list; 110Lisp_Object Qbuffer_predicate;
111static Lisp_Object Qbuffer_list, Qburied_buffer_list;
111Lisp_Object Qtty_color_mode; 112Lisp_Object Qtty_color_mode;
112Lisp_Object Qtty, Qtty_type; 113Lisp_Object Qtty, Qtty_type;
113 114
@@ -120,6 +121,10 @@ Lisp_Object Qface_set_after_frame_default;
120 121
121static Lisp_Object Qdelete_frame_functions; 122static Lisp_Object Qdelete_frame_functions;
122 123
124#ifdef HAVE_WINDOW_SYSTEM
125static void x_report_frame_params (struct frame *, Lisp_Object *);
126#endif
127
123 128
124static void 129static void
125set_menu_bar_lines_1 (Lisp_Object window, int n) 130set_menu_bar_lines_1 (Lisp_Object window, int n)
@@ -548,7 +553,7 @@ make_initial_frame (void)
548} 553}
549 554
550 555
551struct frame * 556static struct frame *
552make_terminal_frame (struct terminal *terminal) 557make_terminal_frame (struct terminal *terminal)
553{ 558{
554 register struct frame *f; 559 register struct frame *f;
@@ -2077,6 +2082,9 @@ See `redirect-frame-focus'. */)
2077 2082
2078/* Return the value of frame parameter PROP in frame FRAME. */ 2083/* Return the value of frame parameter PROP in frame FRAME. */
2079 2084
2085#if !HAVE_NS
2086static
2087#endif
2080Lisp_Object 2088Lisp_Object
2081get_frame_param (register struct frame *frame, Lisp_Object prop) 2089get_frame_param (register struct frame *frame, Lisp_Object prop)
2082{ 2090{
@@ -2832,7 +2840,7 @@ static const struct frame_parm_table frame_parms[] =
2832 {"tool-bar-position", &Qtool_bar_position}, 2840 {"tool-bar-position", &Qtool_bar_position},
2833}; 2841};
2834 2842
2835#ifdef HAVE_WINDOW_SYSTEM 2843#ifdef WINDOWSNT
2836 2844
2837/* Calculate fullscreen size. Return in *TOP_POS and *LEFT_POS the 2845/* Calculate fullscreen size. Return in *TOP_POS and *LEFT_POS the
2838 wanted positions of the WM window (not Emacs window). 2846 wanted positions of the WM window (not Emacs window).
@@ -2876,6 +2884,9 @@ x_fullscreen_adjust (struct frame *f, int *width, int *height, int *top_pos, int
2876 *height = newheight; 2884 *height = newheight;
2877} 2885}
2878 2886
2887#endif /* WINDOWSNT */
2888
2889#ifdef HAVE_WINDOW_SYSTEM
2879 2890
2880/* Change the parameters of frame F as specified by ALIST. 2891/* Change the parameters of frame F as specified by ALIST.
2881 If a parameter is not specially recognized, do nothing special; 2892 If a parameter is not specially recognized, do nothing special;
@@ -3834,31 +3845,6 @@ display_x_get_resource (Display_Info *dpyinfo, Lisp_Object attribute, Lisp_Objec
3834 attribute, class, component, subclass); 3845 attribute, class, component, subclass);
3835} 3846}
3836 3847
3837#if defined HAVE_X_WINDOWS && !defined USE_X_TOOLKIT
3838/* Used when C code wants a resource value. */
3839/* Called from oldXMenu/Create.c. */
3840char *
3841x_get_resource_string (const char *attribute, const char *class)
3842{
3843 char *name_key;
3844 char *class_key;
3845 struct frame *sf = SELECTED_FRAME ();
3846
3847 /* Allocate space for the components, the dots which separate them,
3848 and the final '\0'. */
3849 name_key = (char *) alloca (SBYTES (Vinvocation_name)
3850 + strlen (attribute) + 2);
3851 class_key = (char *) alloca ((sizeof (EMACS_CLASS) - 1)
3852 + strlen (class) + 2);
3853
3854 sprintf (name_key, "%s.%s", SDATA (Vinvocation_name), attribute);
3855 sprintf (class_key, "%s.%s", EMACS_CLASS, class);
3856
3857 return x_get_string_resource (FRAME_X_DISPLAY_INFO (sf)->xrdb,
3858 name_key, class_key);
3859}
3860#endif
3861
3862/* Return the value of parameter PARAM. 3848/* Return the value of parameter PARAM.
3863 3849
3864 First search ALIST, then Vdefault_frame_alist, then the X defaults 3850 First search ALIST, then Vdefault_frame_alist, then the X defaults