FRAME_WINDOW_SIZES_CHANGED (f) = 1;
FRAME_MENU_BAR_LINES (f) = nlines;
set_menu_bar_lines_1 (f->root_window, nlines - olines);
- adjust_glyphs (f);
+ adjust_frame_glyphs (f);
}
}
\f
change_frame_size (f, height, width, 0, 0, 0);
}
- adjust_glyphs (f);
+ adjust_frame_glyphs (f);
calculate_costs (f);
XSETFRAME (frame, f);
/* Verify that we can still talk to the frame's X window,
and note any recent change in visibility. */
-#ifdef HAVE_WINDOW_SYSTEM
+#ifdef HAVE_X_WINDOWS
if (FRAME_WINDOW_P (XFRAME (this)))
x_sync (XFRAME (this));
#endif
return FRAME_FOCUS_FRAME (decode_live_frame (frame));
}
+DEFUN ("x-focus-frame", Fx_focus_frame, Sx_focus_frame, 1, 1, 0,
+ doc: /* Set the input focus to FRAME.
+FRAME nil means use the selected frame.
+If there is no window system support, this function does nothing. */)
+ (Lisp_Object frame)
+{
+#ifdef HAVE_WINDOW_SYSTEM
+ x_focus_frame (decode_window_system_frame (frame));
+#endif
+ return Qnil;
+}
\f
/* Return the value of frame parameter PROP in frame FRAME. */
value = f->name;
#ifdef HAVE_X_WINDOWS
else if (EQ (parameter, Qdisplay) && FRAME_X_P (f))
- value = XCAR (FRAME_X_DISPLAY_INFO (f)->name_list_element);
+ value = XCAR (FRAME_DISPLAY_INFO (f)->name_list_element);
#endif /* HAVE_X_WINDOWS */
else if (EQ (parameter, Qbackground_color)
|| EQ (parameter, Qforeground_color))
{
int newwidth = FRAME_COLS (f);
int newheight = FRAME_LINES (f);
- Display_Info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
+ Display_Info *dpyinfo = FRAME_DISPLAY_INFO (f);
*top_pos = f->top_pos;
*left_pos = f->left_pos;
(FRAME_VISIBLE_P (f) ? Qt
: FRAME_ICONIFIED_P (f) ? Qicon : Qnil));
store_in_alist (alistptr, Qdisplay,
- XCAR (FRAME_X_DISPLAY_INFO (f)->name_list_element));
+ XCAR (FRAME_DISPLAY_INFO (f)->name_list_element));
- if (FRAME_X_OUTPUT (f)->parent_desc == FRAME_X_DISPLAY_INFO (f)->root_window)
+ if (FRAME_X_OUTPUT (f)->parent_desc == FRAME_DISPLAY_INFO (f)->root_window)
tem = Qnil;
else
tem = make_natnum ((uintptr_t) FRAME_X_OUTPUT (f)->parent_desc);
else if (RANGED_INTEGERP (1, arg, INT_MAX)
&& XFASTINT (arg) != FRAME_CONFIG_SCROLL_BAR_WIDTH (f))
{
- if (XFASTINT (arg) <= 2 * VERTICAL_SCROLL_BAR_WIDTH_TRIM)
- XSETINT (arg, 2 * VERTICAL_SCROLL_BAR_WIDTH_TRIM + 1);
-
FRAME_CONFIG_SCROLL_BAR_WIDTH (f) = XFASTINT (arg);
FRAME_CONFIG_SCROLL_BAR_COLS (f) = (XFASTINT (arg) + wid-1) / wid;
if (FRAME_X_WINDOW (f))
esprintf (name_key, "%s.%s", SSDATA (Vinvocation_name), attribute);
sprintf (class_key, "%s.%s", EMACS_CLASS, class);
- result = x_get_string_resource (FRAME_X_DISPLAY_INFO (sf)->xrdb,
+ result = x_get_string_resource (FRAME_DISPLAY_INFO (sf)->xrdb,
name_key, class_key);
SAFE_FREE ();
return result;
const char *attribute, const char *class,
enum resource_types type)
{
- return x_get_arg (FRAME_X_DISPLAY_INFO (f),
+ return x_get_arg (FRAME_DISPLAY_INFO (f),
alist, param, attribute, class, type);
}
{
Lisp_Object value;
- value = x_get_arg (FRAME_X_DISPLAY_INFO (f), alist, param,
+ value = x_get_arg (FRAME_DISPLAY_INFO (f), alist, param,
attribute, class, type);
if (! NILP (value) && ! EQ (value, Qunbound))
store_frame_param (f, param, value);
{
register Lisp_Object tem0, tem1, tem2;
long window_prompting = 0;
- Display_Info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
+ Display_Info *dpyinfo = FRAME_DISPLAY_INFO (f);
/* Default values if we fall through.
Actually, if that happens we should get
defsubr (&Svisible_frame_list);
defsubr (&Sraise_frame);
defsubr (&Slower_frame);
+ defsubr (&Sx_focus_frame);
defsubr (&Sredirect_frame_focus);
defsubr (&Sframe_focus);
defsubr (&Sframe_parameters);