/* Functions for the X window system.
Copyright (C) 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
- 2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
+ 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
+ Free Software Foundation, Inc.
This file is part of GNU Emacs.
!NILP (bar);
bar = XSCROLL_BAR (bar)->next)
{
- Window window = SCROLL_BAR_X_WINDOW (XSCROLL_BAR (bar));
+ Window window = XSCROLL_BAR (bar)->x_window;
XSetWindowBackground (dpy, window, bg);
}
}
XtManageChild (pane_widget);
XtRealizeWidget (shell_widget);
+ if (FRAME_X_EMBEDDED_P (f))
+ XReparentWindow (FRAME_X_DISPLAY (f), XtWindow (shell_widget),
+ f->output_data.x->parent_desc, 0, 0);
+
FRAME_X_WINDOW (f) = XtWindow (frame_widget);
validate_x_resource_name ();
Note that many default values are used. */
/* Normal video */
+#ifdef USE_FONT_BACKEND
+ if (enable_font_backend)
+ gc_values.font = FRAME_X_DISPLAY_INFO (f)->font->fid;
+ else
+#endif
gc_values.font = FRAME_FONT (f)->fid;
gc_values.foreground = FRAME_FOREGROUND_PIXEL (f);
gc_values.background = FRAME_BACKGROUND_PIXEL (f);
DEFUN ("x-create-frame", Fx_create_frame, Sx_create_frame,
1, 1, 0,
doc: /* Make a new X window, which is called a "frame" in Emacs terms.
-Returns an Emacs frame object.
+Return an Emacs frame object.
ALIST is an alist of frame parameters.
If the parameters specify that the frame should not have a minibuffer,
and do not specify a specific minibuffer window to use,
/* With FRAME_X_DISPLAY_INFO set up, this unwind-protect is safe. */
record_unwind_protect (unwind_create_frame, frame);
#if GLYPH_DEBUG
- image_cache_refcount = FRAME_X_IMAGE_CACHE (f)->refcount;
+ image_cache_refcount = FRAME_IMAGE_CACHE (f)->refcount;
dpyinfo_refcount = dpyinfo->reference_count;
#endif /* GLYPH_DEBUG */
xlwmenu_default_font = FRAME_FONT (f);
#endif
- x_default_parameter (f, parms, Qborder_width, make_number (2),
- "borderWidth", "BorderWidth", RES_TYPE_NUMBER);
+ /* Frame contents get displaced if an embedded X window has a border. */
+ if (! FRAME_X_EMBEDDED_P (f))
+ x_default_parameter (f, parms, Qborder_width, make_number (2),
+ "borderWidth", "BorderWidth", RES_TYPE_NUMBER);
/* This defaults to 1 in order to match xterm. We recognize either
internalBorderWidth or internalBorder (which is what xterm calls
x_default_parameter (f, parms, Qfullscreen, Qnil,
"fullscreen", "Fullscreen", RES_TYPE_SYMBOL);
- f->output_data.x->parent_desc = FRAME_X_DISPLAY_INFO (f)->root_window;
-
/* Compute the size of the X window. */
window_prompting = x_figure_window_size (f, parms, 1);
DEFUN ("x-display-pixel-width", Fx_display_pixel_width, Sx_display_pixel_width,
0, 1, 0,
- doc: /* Returns the width in pixels of the X display TERMINAL.
+ doc: /* Return the width in pixels of the X display TERMINAL.
The optional argument TERMINAL specifies which display to ask about.
TERMINAL should be a terminal id, a frame or a display name (a string).
If omitted or nil, that stands for the selected frame's display. */)
DEFUN ("x-display-pixel-height", Fx_display_pixel_height,
Sx_display_pixel_height, 0, 1, 0,
- doc: /* Returns the height in pixels of the X display TERMINAL.
+ doc: /* Return the height in pixels of the X display TERMINAL.
The optional argument TERMINAL specifies which display to ask about.
TERMINAL should be a terminal id, a frame or a display name (a string).
If omitted or nil, that stands for the selected frame's display. */)
DEFUN ("x-display-planes", Fx_display_planes, Sx_display_planes,
0, 1, 0,
- doc: /* Returns the number of bitplanes of the X display TERMINAL.
+ doc: /* Return the number of bitplanes of the X display TERMINAL.
The optional argument TERMINAL specifies which display to ask about.
TERMINAL should be a terminal id, a frame or a display name (a string).
If omitted or nil, that stands for the selected frame's display. */)
DEFUN ("x-display-color-cells", Fx_display_color_cells, Sx_display_color_cells,
0, 1, 0,
- doc: /* Returns the number of color cells of the X display TERMINAL.
+ doc: /* Return the number of color cells of the X display TERMINAL.
The optional argument TERMINAL specifies which display to ask about.
TERMINAL should be a terminal id, a frame or a display name (a string).
If omitted or nil, that stands for the selected frame's display. */)
DEFUN ("x-server-max-request-size", Fx_server_max_request_size,
Sx_server_max_request_size,
0, 1, 0,
- doc: /* Returns the maximum request size of the X server of display TERMINAL.
+ doc: /* Return the maximum request size of the X server of display TERMINAL.
The optional argument TERMINAL specifies which display to ask about.
TERMINAL should be a terminal id, a frame or a display name (a string).
If omitted or nil, that stands for the selected frame's display. */)
}
DEFUN ("x-server-vendor", Fx_server_vendor, Sx_server_vendor, 0, 1, 0,
- doc: /* Returns the "vendor ID" string of the X server of display TERMINAL.
+ doc: /* Return the "vendor ID" string of the X server of display TERMINAL.
\(Labelling every distributor as a "vendor" embodies the false assumption
that operating systems cannot be developed and distributed noncommercially.)
The optional argument TERMINAL specifies which display to ask about.
}
DEFUN ("x-server-version", Fx_server_version, Sx_server_version, 0, 1, 0,
- doc: /* Returns the version numbers of the X server of display TERMINAL.
+ doc: /* Return the version numbers of the X server of display TERMINAL.
The value is a list of three integers: the major and minor
version numbers of the X Protocol in use, and the distributor-specific release
number. See also the function `x-server-vendor'.
DEFUN ("x-display-backing-store", Fx_display_backing_store,
Sx_display_backing_store, 0, 1, 0,
- doc: /* Returns an indication of whether X display TERMINAL does backing store.
+ doc: /* Return an indication of whether X display TERMINAL does backing store.
The value may be `always', `when-mapped', or `not-useful'.
The optional argument TERMINAL specifies which display to ask about.
TERMINAL should be a terminal id, a frame or a display name (a string).
DEFUN ("x-display-save-under", Fx_display_save_under,
Sx_display_save_under, 0, 1, 0,
- doc: /* Returns t if the X display TERMINAL supports the save-under feature.
+ doc: /* Return t if the X display TERMINAL supports the save-under feature.
The optional argument TERMINAL specifies which display to ask about.
TERMINAL should be a terminal id, a frame or a display name (a string).
If omitted or nil, that stands for the selected frame's display. */)
f->icon_name = Qnil;
FRAME_X_DISPLAY_INFO (f) = dpyinfo;
#if GLYPH_DEBUG
- image_cache_refcount = FRAME_X_IMAGE_CACHE (f)->refcount;
+ image_cache_refcount = FRAME_IMAGE_CACHE (f)->refcount;
dpyinfo_refcount = dpyinfo->reference_count;
#endif /* GLYPH_DEBUG */
f->output_data.x->parent_desc = FRAME_X_DISPLAY_INFO (f)->root_window;
GCPRO4 (string, parms, frame, timeout);
CHECK_STRING (string);
+ if (SCHARS (string) == 0)
+ string = make_unibyte_string (" ", 1);
+
f = check_x_frame (frame);
if (NILP (timeout))
timeout = make_number (5);