summaryrefslogtreecommitdiff
path: root/src/frame.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/frame.c')
-rw-r--r--src/frame.c329
1 files changed, 169 insertions, 160 deletions
diff --git a/src/frame.c b/src/frame.c
index 854f72e64b4..70ae309fe20 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -20,6 +20,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#include <config.h>
#include <stdio.h>
+#include <stdlib.h>
#include <errno.h>
#include <limits.h>
@@ -106,31 +107,32 @@ decode_any_frame (register Lisp_Object frame)
}
#ifdef HAVE_WINDOW_SYSTEM
-
bool
-window_system_available (struct frame *f)
+display_available (void)
{
- return f ? FRAME_WINDOW_P (f) || FRAME_MSDOS_P (f) : x_display_list != NULL;
+ return x_display_list != NULL;
}
-
-#endif /* HAVE_WINDOW_SYSTEM */
+#endif
struct frame *
decode_window_system_frame (Lisp_Object frame)
{
struct frame *f = decode_live_frame (frame);
-
- if (!window_system_available (f))
- error ("Window system frame should be used");
+ check_window_system (f);
+#ifdef HAVE_WINDOW_SYSTEM
return f;
+#endif
}
void
check_window_system (struct frame *f)
{
- if (!window_system_available (f))
- error (f ? "Window system frame should be used"
- : "Window system is not in use or not initialized");
+#ifdef HAVE_WINDOW_SYSTEM
+ if (window_system_available (f))
+ return;
+#endif
+ error (f ? "Window system frame should be used"
+ : "Window system is not in use or not initialized");
}
/* Return the value of frame parameter PROP in frame FRAME. */
@@ -500,8 +502,8 @@ adjust_frame_size (struct frame *f, int new_width, int new_height, int inhibit,
&& new_lines == old_lines)
/* No change. Sanitize window sizes and return. */
{
- sanitize_window_sizes (frame, Qt);
- sanitize_window_sizes (frame, Qnil);
+ sanitize_window_sizes (Qt);
+ sanitize_window_sizes (Qnil);
return;
}
@@ -537,7 +539,7 @@ adjust_frame_size (struct frame *f, int new_width, int new_height, int inhibit,
#endif
}
else if (new_cols != old_cols)
- call2 (Qwindow_pixel_to_total, frame, Qt);
+ call2 (Qwindow__pixel_to_total, frame, Qt);
if (new_windows_height != old_windows_height
/* When the top margin has changed we have to recalculate the top
@@ -553,7 +555,7 @@ adjust_frame_size (struct frame *f, int new_width, int new_height, int inhibit,
FrameRows (FRAME_TTY (f)) = new_lines + FRAME_TOP_MARGIN (f);
}
else if (new_lines != old_lines)
- call2 (Qwindow_pixel_to_total, frame, Qnil);
+ call2 (Qwindow__pixel_to_total, frame, Qnil);
frame_size_history_add
(f, Qadjust_frame_size_3, new_text_width, new_text_height,
@@ -581,8 +583,8 @@ adjust_frame_size (struct frame *f, int new_width, int new_height, int inhibit,
}
/* Sanitize window sizes. */
- sanitize_window_sizes (frame, Qt);
- sanitize_window_sizes (frame, Qnil);
+ sanitize_window_sizes (Qt);
+ sanitize_window_sizes (Qnil);
adjust_frame_glyphs (f);
calculate_costs (f);
@@ -594,8 +596,6 @@ adjust_frame_size (struct frame *f, int new_width, int new_height, int inhibit,
|| new_pixel_height != old_pixel_height);
unblock_input ();
-
- run_window_configuration_change_hook (f);
}
/* Allocate basically initialized frame. */
@@ -611,7 +611,7 @@ make_frame (bool mini_p)
{
Lisp_Object frame;
struct frame *f;
- struct window *rw, *mw IF_LINT (= NULL);
+ struct window *rw, *mw UNINIT;
Lisp_Object root_window;
Lisp_Object mini_window;
@@ -659,6 +659,7 @@ make_frame (bool mini_p)
mw->mini = 1;
wset_frame (mw, frame);
fset_minibuffer_window (f, mini_window);
+ store_frame_param (f, Qminibuffer, Qt);
}
else
{
@@ -771,6 +772,7 @@ make_frame_without_minibuffer (Lisp_Object mini_window, KBOARD *kb,
}
fset_minibuffer_window (f, mini_window);
+ store_frame_param (f, Qminibuffer, mini_window);
/* Make the chosen minibuffer window display the proper minibuffer,
unless it is already showing a minibuffer. */
@@ -808,6 +810,7 @@ make_minibuffer_frame (void)
mini_window = f->root_window;
fset_minibuffer_window (f, mini_window);
+ store_frame_param (f, Qminibuffer, Qonly);
XWINDOW (mini_window)->mini = 1;
wset_next (XWINDOW (mini_window), Qnil);
wset_prev (XWINDOW (mini_window), Qnil);
@@ -1064,6 +1067,10 @@ affects all frames on the same terminal device. */)
(t->display_info.tty->name
? build_string (t->display_info.tty->name)
: Qnil));
+ /* On terminal frames the `minibuffer' frame parameter is always
+ virtually t. Avoid that a different value in parms causes
+ complaints, see Bug#24758. */
+ store_in_alist (&parms, Qminibuffer, Qt);
Fmodify_frame_parameters (frame, parms);
/* Make the frame face alist be frame-specific, so that each
@@ -1157,7 +1164,12 @@ do_switch_frame (Lisp_Object frame, int track, int for_deletion, Lisp_Object nor
if (FRAMEP (xfocus))
{
focus = FRAME_FOCUS_FRAME (XFRAME (xfocus));
- if (FRAMEP (focus) && XFRAME (focus) == SELECTED_FRAME ())
+ if ((FRAMEP (focus) && XFRAME (focus) == SELECTED_FRAME ())
+ /* Redirect frame focus also when FRAME has its minibuffer
+ window on the selected frame (see Bug#24500). */
+ || (NILP (focus)
+ && EQ (FRAME_MINIBUF_WINDOW (XFRAME (frame)),
+ sf->selected_window)))
Fredirect_frame_focus (xfocus, frame);
}
}
@@ -1824,7 +1836,7 @@ delete_frame (Lisp_Object frame, Lisp_Object force)
DEFUN ("delete-frame", Fdelete_frame, Sdelete_frame, 0, 2, "",
doc: /* Delete FRAME, permanently eliminating it from use.
-FRAME defaults to the selected frame.
+FRAME must be a live frame and defaults to the selected one.
A frame may not be deleted if its minibuffer serves as surrogate
minibuffer for another frame. Normally, you may not delete a frame if
@@ -2137,10 +2149,12 @@ If omitted, FRAME defaults to the currently selected frame. */)
check_minibuf_window (frame, EQ (minibuf_window, selected_window));
/* I think this should be done with a hook. */
-#ifdef HAVE_WINDOW_SYSTEM
if (FRAME_WINDOW_P (f))
+ {
+#ifdef HAVE_WINDOW_SYSTEM
x_iconify_frame (f);
#endif
+ }
/* Make menu bar update for the Buffers and Frames menus. */
windows_or_buffers_changed = 17;
@@ -2403,6 +2417,46 @@ store_frame_param (struct frame *f, Lisp_Object prop, Lisp_Object val)
{
register Lisp_Object old_alist_elt;
+ if (EQ (prop, Qminibuffer))
+ {
+ if (WINDOWP (val))
+ {
+ if (!MINI_WINDOW_P (XWINDOW (val)))
+ error ("The `minibuffer' parameter does not specify a valid minibuffer window");
+ else if (FRAME_MINIBUF_ONLY_P (f))
+ {
+ if (EQ (val, FRAME_MINIBUF_WINDOW (f)))
+ val = Qonly;
+ else
+ error ("Can't change the minibuffer window of a minibuffer-only frame");
+ }
+ else if (FRAME_HAS_MINIBUF_P (f))
+ {
+ if (EQ (val, FRAME_MINIBUF_WINDOW (f)))
+ val = Qt;
+ else
+ error ("Can't change the minibuffer window of a frame with its own minibuffer");
+ }
+ else
+ /* Store the chosen minibuffer window. */
+ fset_minibuffer_window (f, val);
+ }
+ else
+ {
+ Lisp_Object old_val = Fcdr (Fassq (Qminibuffer, f->param_alist));
+
+ if (!NILP (old_val))
+ {
+ if (WINDOWP (old_val) && NILP (val))
+ /* Don't change the value for a minibuffer-less frame if
+ only nil was specified as new value. */
+ val = old_val;
+ else if (!EQ (old_val, val))
+ error ("Can't change the `minibuffer' parameter of this frame");
+ }
+ }
+ }
+
/* The buffer-list parameters are stored in a special place and not
in the alist. All buffers must be live. */
if (EQ (prop, Qbuffer_list))
@@ -2424,28 +2478,6 @@ store_frame_param (struct frame *f, Lisp_Object prop, Lisp_Object val)
return;
}
- /* If PROP is a symbol which is supposed to have frame-local values,
- and it is set up based on this frame, switch to the global
- binding. That way, we can create or alter the frame-local binding
- without messing up the symbol's status. */
- if (SYMBOLP (prop))
- {
- struct Lisp_Symbol *sym = XSYMBOL (prop);
- start:
- switch (sym->redirect)
- {
- case SYMBOL_VARALIAS: sym = indirect_variable (sym); goto start;
- case SYMBOL_PLAINVAL: case SYMBOL_FORWARDED: break;
- case SYMBOL_LOCALIZED:
- { struct Lisp_Buffer_Local_Value *blv = sym->val.blv;
- if (blv->frame_local && blv_found (blv) && XFRAME (blv->where) == f)
- swap_in_global_binding (sym);
- break;
- }
- default: emacs_abort ();
- }
- }
-
/* The tty color needed to be set before the frame's parameter
alist was updated with the new value. This is not true any more,
but we still do this test early on. */
@@ -2474,19 +2506,6 @@ store_frame_param (struct frame *f, Lisp_Object prop, Lisp_Object val)
else if (EQ (prop, Qname))
set_term_frame_name (f, val);
}
-
- if (EQ (prop, Qminibuffer) && WINDOWP (val))
- {
- if (! MINI_WINDOW_P (XWINDOW (val)))
- error ("Surrogate minibuffer windows must be minibuffer windows");
-
- if ((FRAME_HAS_MINIBUF_P (f) || FRAME_MINIBUF_ONLY_P (f))
- && !EQ (val, f->minibuffer_window))
- error ("Can't change the surrogate minibuffer of a frame with its own minibuffer");
-
- /* Install the chosen minibuffer window, with proper buffer. */
- fset_minibuffer_window (f, val);
- }
}
/* Return color matches UNSPEC on frame F or nil if UNSPEC
@@ -2564,10 +2583,6 @@ If FRAME is omitted or nil, return information on the currently selected frame.
: FRAME_COLS (f));
store_in_alist (&alist, Qwidth, make_number (width));
store_in_alist (&alist, Qmodeline, (FRAME_WANTS_MODELINE_P (f) ? Qt : Qnil));
- store_in_alist (&alist, Qminibuffer,
- (! FRAME_HAS_MINIBUF_P (f) ? Qnil
- : FRAME_MINIBUF_ONLY_P (f) ? Qonly
- : FRAME_MINIBUF_WINDOW (f)));
store_in_alist (&alist, Qunsplittable, (FRAME_NO_SPLIT_P (f) ? Qt : Qnil));
store_in_alist (&alist, Qbuffer_list, f->buffer_list);
store_in_alist (&alist, Qburied_buffer_list, f->buried_buffer_list);
@@ -2606,6 +2621,22 @@ If FRAME is nil, describe the currently selected frame. */)
/* Avoid consing in frequent cases. */
if (EQ (parameter, Qname))
value = f->name;
+#ifdef HAVE_WINDOW_SYSTEM
+ /* These are used by vertical motion commands. */
+ else if (EQ (parameter, Qvertical_scroll_bars))
+ value = (f->vertical_scroll_bar_type == vertical_scroll_bar_none
+ ? Qnil
+ : (f->vertical_scroll_bar_type == vertical_scroll_bar_left
+ ? Qleft : Qright));
+ else if (EQ (parameter, Qhorizontal_scroll_bars))
+ value = f->horizontal_scroll_bars ? Qt : Qnil;
+ else if (EQ (parameter, Qline_spacing) && f->extra_line_spacing == 0)
+ /* If this is non-zero, we can't determine whether the user specified
+ an integer or float value without looking through 'param_alist'. */
+ value = make_number (0);
+ else if (EQ (parameter, Qfont) && FRAME_X_P (f))
+ value = FRAME_FONT (f)->props[FONT_NAME_INDEX];
+#endif /* HAVE_WINDOW_SYSTEM */
#ifdef HAVE_X_WINDOWS
else if (EQ (parameter, Qdisplay) && FRAME_X_P (f))
value = XCAR (FRAME_DISPLAY_INFO (f)->name_list_element);
@@ -2656,13 +2687,7 @@ The meaningful parameters are acted upon, i.e. the frame is changed
according to their new values, and are also stored in the frame's
parameter list so that `frame-parameters' will return them.
PARMs that are not meaningful are still stored in the frame's parameter
-list, but are otherwise ignored.
-
-The value of frame parameter FOO can also be accessed
-as a frame-local binding for the variable FOO, if you have
-enabled such bindings for that variable with `make-variable-frame-local'.
-Note that this functionality is obsolete as of Emacs 22.2, and its
-use is not recommended. Explicitly check for a frame-parameter instead. */)
+list, but are otherwise ignored. */)
(Lisp_Object frame, Lisp_Object alist)
{
struct frame *f = decode_live_frame (frame);
@@ -3003,16 +3028,18 @@ or bottom edge of the outer frame of FRAME relative to the right or
bottom edge of FRAME's display. */)
(Lisp_Object frame, Lisp_Object x, Lisp_Object y)
{
- register struct frame *f = decode_live_frame (frame);
+ struct frame *f = decode_live_frame (frame);
CHECK_TYPE_RANGED_INTEGER (int, x);
CHECK_TYPE_RANGED_INTEGER (int, y);
/* I think this should be done with a hook. */
-#ifdef HAVE_WINDOW_SYSTEM
if (FRAME_WINDOW_P (f))
- x_set_offset (f, XINT (x), XINT (y), 1);
+ {
+#ifdef HAVE_WINDOW_SYSTEM
+ x_set_offset (f, XINT (x), XINT (y), 1);
#endif
+ }
return Qt;
}
@@ -3073,6 +3100,7 @@ static const struct frame_parm_table frame_parms[] =
{"alpha", SYMBOL_INDEX (Qalpha)},
{"sticky", SYMBOL_INDEX (Qsticky)},
{"tool-bar-position", SYMBOL_INDEX (Qtool_bar_position)},
+ {"inhibit-double-buffering", SYMBOL_INDEX (Qinhibit_double_buffering)},
};
#ifdef HAVE_WINDOW_SYSTEM
@@ -3091,8 +3119,7 @@ x_set_frame_parameters (struct frame *f, Lisp_Object alist)
/* If both of these parameters are present, it's more efficient to
set them both at once. So we wait until we've looked at the
entire list before we set them. */
- int width IF_LINT (= 0), height IF_LINT (= 0);
- bool width_change = false, height_change = false;
+ int width = -1, height = -1; /* -1 denotes they were not changed. */
/* Same here. */
Lisp_Object left, top;
@@ -3107,70 +3134,58 @@ x_set_frame_parameters (struct frame *f, Lisp_Object alist)
/* Record in these vectors all the parms specified. */
Lisp_Object *parms;
Lisp_Object *values;
- ptrdiff_t i, p;
+ ptrdiff_t i, j, size;
bool left_no_change = 0, top_no_change = 0;
#ifdef HAVE_X_WINDOWS
bool icon_left_no_change = 0, icon_top_no_change = 0;
#endif
- i = 0;
- for (tail = alist; CONSP (tail); tail = XCDR (tail))
- i++;
+ for (size = 0, tail = alist; CONSP (tail); tail = XCDR (tail))
+ size++;
USE_SAFE_ALLOCA;
- SAFE_ALLOCA_LISP (parms, 2 * i);
- values = parms + i;
+ SAFE_ALLOCA_LISP (parms, 2 * size);
+ values = parms + size;
/* Extract parm names and values into those vectors. */
- i = 0;
+ i = 0, j = size - 1;
for (tail = alist; CONSP (tail); tail = XCDR (tail))
{
- Lisp_Object elt;
-
- elt = XCAR (tail);
- parms[i] = Fcar (elt);
- values[i] = Fcdr (elt);
- i++;
- }
- /* TAIL and ALIST are not used again below here. */
- alist = tail = Qnil;
+ Lisp_Object elt = XCAR (tail), prop = Fcar (elt), val = Fcdr (elt);
- top = left = Qunbound;
- icon_left = icon_top = Qunbound;
-
- /* Process foreground_color and background_color before anything else.
- They are independent of other properties, but other properties (e.g.,
- cursor_color) are dependent upon them. */
- /* Process default font as well, since fringe widths depends on it. */
- for (p = 0; p < i; p++)
- {
- Lisp_Object prop, val;
+ /* Some properties are independent of other properties, but other
+ properties are dependent upon them. These special properties
+ are foreground_color, background_color (affects cursor_color)
+ and font (affects fringe widths); they're recorded starting
+ from the end of PARMS and VALUES to process them first by using
+ reverse iteration. */
- prop = parms[p];
- val = values[p];
if (EQ (prop, Qforeground_color)
|| EQ (prop, Qbackground_color)
|| EQ (prop, Qfont))
{
- register Lisp_Object param_index, old_value;
-
- old_value = get_frame_param (f, prop);
- if (NILP (Fequal (val, old_value)))
- {
- store_frame_param (f, prop, val);
-
- param_index = Fget (prop, Qx_frame_parameter);
- if (NATNUMP (param_index)
- && XFASTINT (param_index) < ARRAYELTS (frame_parms)
- && FRAME_RIF (f)->frame_parm_handlers[XINT (param_index)])
- (*(FRAME_RIF (f)->frame_parm_handlers[XINT (param_index)])) (f, val, old_value);
- }
+ parms[j] = prop;
+ values[j] = val;
+ j--;
+ }
+ else
+ {
+ parms[i] = prop;
+ values[i] = val;
+ i++;
}
}
- /* Now process them in reverse of specified order. */
- while (i-- != 0)
+ /* TAIL and ALIST are not used again below here. */
+ alist = tail = Qnil;
+
+ top = left = Qunbound;
+ icon_left = icon_top = Qunbound;
+
+ /* Reverse order is used to make sure that special
+ properties noticed above are processed first. */
+ for (i = size - 1; i >= 0; i--)
{
Lisp_Object prop, val;
@@ -3180,30 +3195,18 @@ x_set_frame_parameters (struct frame *f, Lisp_Object alist)
if (EQ (prop, Qwidth))
{
if (RANGED_INTEGERP (0, val, INT_MAX))
- {
- width = XFASTINT (val) * FRAME_COLUMN_WIDTH (f) ;
- width_change = true;
- }
+ width = XFASTINT (val) * FRAME_COLUMN_WIDTH (f) ;
else if (CONSP (val) && EQ (XCAR (val), Qtext_pixels)
&& RANGED_INTEGERP (0, XCDR (val), INT_MAX))
- {
- width = XFASTINT (XCDR (val));
- width_change = true;
- }
+ width = XFASTINT (XCDR (val));
}
else if (EQ (prop, Qheight))
{
if (RANGED_INTEGERP (0, val, INT_MAX))
- {
- height = XFASTINT (val) * FRAME_LINE_HEIGHT (f);
- height_change = true;
- }
+ height = XFASTINT (val) * FRAME_LINE_HEIGHT (f);
else if (CONSP (val) && EQ (XCAR (val), Qtext_pixels)
&& RANGED_INTEGERP (0, XCDR (val), INT_MAX))
- {
- height = XFASTINT (XCDR (val));
- height_change = true;
- }
+ height = XFASTINT (XCDR (val));
}
else if (EQ (prop, Qtop))
top = val;
@@ -3218,11 +3221,6 @@ x_set_frame_parameters (struct frame *f, Lisp_Object alist)
fullscreen = val;
fullscreen_change = true;
}
- else if (EQ (prop, Qforeground_color)
- || EQ (prop, Qbackground_color)
- || EQ (prop, Qfont))
- /* Processed above. */
- continue;
else
{
register Lisp_Object param_index, old_value;
@@ -3290,16 +3288,15 @@ x_set_frame_parameters (struct frame *f, Lisp_Object alist)
XSETFRAME (frame, f);
- if ((width_change && width != FRAME_TEXT_WIDTH (f))
- || (height_change && height != FRAME_TEXT_HEIGHT (f)))
+ if ((width != -1 && width != FRAME_TEXT_WIDTH (f))
+ || (height != -1 && height != FRAME_TEXT_HEIGHT (f)))
/* We could consider checking f->after_make_frame here, but I
don't have the faintest idea why the following is needed at
all. With the old setting it can get a Heisenbug when
EmacsFrameResize intermittently provokes a delayed
change_frame_size in the middle of adjust_frame_size. */
/** || (f->can_x_set_window_size && (f->new_height || f->new_width))) **/
- adjust_frame_size (f, width_change ? width : -1,
- height_change ? height : -1, 1, 0, Qx_set_frame_parameters);
+ adjust_frame_size (f, width, height, 1, 0, Qx_set_frame_parameters);
if ((!NILP (left) || !NILP (top))
&& ! (left_no_change && top_no_change)
@@ -3646,7 +3643,7 @@ x_set_font (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
x_new_font (f, font_object, fontset);
store_frame_param (f, Qfont, arg);
#ifdef HAVE_X_WINDOWS
- store_frame_param (f, Qfont_param, font_param);
+ store_frame_param (f, Qfont_parameter, font_param);
#endif
/* Recalculate toolbar height. */
f->n_tool_bar_rows = 0;
@@ -3741,8 +3738,8 @@ x_set_left_fringe (struct frame *f, Lisp_Object new_value, Lisp_Object old_value
if (new_width != old_width)
{
- FRAME_LEFT_FRINGE_WIDTH (f) = new_width;
- FRAME_FRINGE_COLS (f) /* Round up. */
+ f->left_fringe_width = new_width;
+ f->fringe_cols /* Round up. */
= (new_width + FRAME_RIGHT_FRINGE_WIDTH (f) + unit - 1) / unit;
if (FRAME_X_WINDOW (f) != 0)
@@ -3765,8 +3762,8 @@ x_set_right_fringe (struct frame *f, Lisp_Object new_value, Lisp_Object old_valu
if (new_width != old_width)
{
- FRAME_RIGHT_FRINGE_WIDTH (f) = new_width;
- FRAME_FRINGE_COLS (f) /* Round up. */
+ f->right_fringe_width = new_width;
+ f->fringe_cols /* Round up. */
= (new_width + FRAME_LEFT_FRINGE_WIDTH (f) + unit - 1) / unit;
if (FRAME_X_WINDOW (f) != 0)
@@ -3795,13 +3792,11 @@ void
x_set_right_divider_width (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
{
int old = FRAME_RIGHT_DIVIDER_WIDTH (f);
-
CHECK_TYPE_RANGED_INTEGER (int, arg);
- FRAME_RIGHT_DIVIDER_WIDTH (f) = XINT (arg);
- if (FRAME_RIGHT_DIVIDER_WIDTH (f) < 0)
- FRAME_RIGHT_DIVIDER_WIDTH (f) = 0;
- if (FRAME_RIGHT_DIVIDER_WIDTH (f) != old)
+ int new = max (0, XINT (arg));
+ if (new != old)
{
+ f->right_divider_width = new;
adjust_frame_size (f, -1, -1, 4, 0, Qright_divider_width);
adjust_frame_glyphs (f);
SET_FRAME_GARBAGED (f);
@@ -3813,13 +3808,11 @@ void
x_set_bottom_divider_width (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
{
int old = FRAME_BOTTOM_DIVIDER_WIDTH (f);
-
CHECK_TYPE_RANGED_INTEGER (int, arg);
- FRAME_BOTTOM_DIVIDER_WIDTH (f) = XINT (arg);
- if (FRAME_BOTTOM_DIVIDER_WIDTH (f) < 0)
- FRAME_BOTTOM_DIVIDER_WIDTH (f) = 0;
- if (FRAME_BOTTOM_DIVIDER_WIDTH (f) != old)
+ int new = max (0, XINT (arg));
+ if (new != old)
{
+ f->bottom_divider_width = new;
adjust_frame_size (f, -1, -1, 4, 0, Qbottom_divider_width);
adjust_frame_glyphs (f);
SET_FRAME_GARBAGED (f);
@@ -4423,8 +4416,8 @@ XParseGeometry (char *string,
{
int mask = NoValue;
char *strind;
- unsigned long tempWidth, tempHeight;
- long int tempX, tempY;
+ unsigned long tempWidth UNINIT, tempHeight UNINIT;
+ long int tempX UNINIT, tempY UNINIT;
char *nextCharacter;
if (string == NULL || *string == '\0')
@@ -4889,7 +4882,7 @@ syms_of_frame (void)
DEFSYM (Qframep, "framep");
DEFSYM (Qframe_live_p, "frame-live-p");
DEFSYM (Qframe_windows_min_size, "frame-windows-min-size");
- DEFSYM (Qwindow_pixel_to_total, "window--pixel-to-total");
+ DEFSYM (Qwindow__pixel_to_total, "window--pixel-to-total");
DEFSYM (Qexplicit_name, "explicit-name");
DEFSYM (Qheight, "height");
DEFSYM (Qicon, "icon");
@@ -5024,6 +5017,7 @@ syms_of_frame (void)
DEFSYM (Qvertical_scroll_bars, "vertical-scroll-bars");
DEFSYM (Qvisibility, "visibility");
DEFSYM (Qwait_for_wm, "wait-for-wm");
+ DEFSYM (Qinhibit_double_buffering, "inhibit-double-buffering");
{
int i;
@@ -5267,6 +5261,21 @@ The function `frame--size-history' displays the value of this variable
in a more readable form. */);
frame_size_history = Qnil;
+ DEFVAR_BOOL ("tooltip-reuse-hidden-frame", tooltip_reuse_hidden_frame,
+ doc: /* Non-nil means reuse hidden tooltip frames.
+When this is nil, delete a tooltip frame when hiding the associated
+tooltip. When this is non-nil, make the tooltip frame invisible only,
+so it can be reused when the next tooltip is shown.
+
+Setting this to non-nil may drastically reduce the consing overhead
+incurred by creating new tooltip frames. However, a value of non-nil
+means also that intermittent changes of faces or `default-frame-alist'
+are not applied when showing a tooltip in a reused frame.
+
+This variable is effective only with the X toolkit (and there only when
+Gtk+ tooltips are not used) and on Windows. */);
+ tooltip_reuse_hidden_frame = false;
+
staticpro (&Vframe_list);
defsubr (&Sframep);