Unify FRAME_window_system_DISPLAY_INFO macros between all ports.
All of them are replaced with FRAME_DISPLAY_INFO, defined in each port to reference the port-specific window system data. * msdos.h (FRAME_X_DISPLAY_INFO): Remove. (FRAME_DISPLAY_INFO): Define. * w32term.h (FRAME_W32_DISPLAY_INFO, FRAME_X_DISPLAY_INFO): Remove. (FRAME_DISPLAY_INFO): Define. Adjust users. * xterm.h (FRAME_X_DISPLAY_INFO): Remove. (FRAME_DISPLAY_INFO): Define. Adjust users. * frame.h (FRAME_RES_X, FRAME_RES_Y): Unify. * font.c, frame.c, gtkutil.c, image.c, menu.c, msdos.c, nsfns.m: * nsfont.m, nsterm.m, w32fns.c, w32font.c, w32menu.c, w32term.c: * w32xfns.c, widget.c, xdisp.c, xfaces.c, xfns.c, xfont.c, xmenu.c: * xselect.c, xterm.c: All related users changed.
This commit is contained in:
parent
7830899f39
commit
aad3612f9e
28 changed files with 352 additions and 354 deletions
|
@ -1,3 +1,20 @@
|
|||
2013-09-13 Dmitry Antipov <dmantipov@yandex.ru>
|
||||
|
||||
Unify FRAME_window_system_DISPLAY_INFO macros between all ports.
|
||||
All of them are replaced with FRAME_DISPLAY_INFO, defined in
|
||||
each port to reference the port-specific window system data.
|
||||
* msdos.h (FRAME_X_DISPLAY_INFO): Remove.
|
||||
(FRAME_DISPLAY_INFO): Define.
|
||||
* w32term.h (FRAME_W32_DISPLAY_INFO, FRAME_X_DISPLAY_INFO): Remove.
|
||||
(FRAME_DISPLAY_INFO): Define. Adjust users.
|
||||
* xterm.h (FRAME_X_DISPLAY_INFO): Remove.
|
||||
(FRAME_DISPLAY_INFO): Define. Adjust users.
|
||||
* frame.h (FRAME_RES_X, FRAME_RES_Y): Unify.
|
||||
* font.c, frame.c, gtkutil.c, image.c, menu.c, msdos.c, nsfns.m:
|
||||
* nsfont.m, nsterm.m, w32fns.c, w32font.c, w32menu.c, w32term.c:
|
||||
* w32xfns.c, widget.c, xdisp.c, xfaces.c, xfns.c, xfont.c, xmenu.c:
|
||||
* xselect.c, xterm.c: All related users changed.
|
||||
|
||||
2013-09-13 Dmitry Antipov <dmantipov@yandex.ru>
|
||||
|
||||
* xterm.h (x_window_to_frame, x_any_window_to_frame)
|
||||
|
|
|
@ -2861,8 +2861,8 @@ font_open_entity (struct frame *f, Lisp_Object entity, int pixel_size)
|
|||
: 1);
|
||||
height = (font->height ? font->height : 1);
|
||||
#ifdef HAVE_WINDOW_SYSTEM
|
||||
FRAME_X_DISPLAY_INFO (f)->n_fonts++;
|
||||
if (FRAME_X_DISPLAY_INFO (f)->n_fonts == 1)
|
||||
FRAME_DISPLAY_INFO (f)->n_fonts++;
|
||||
if (FRAME_DISPLAY_INFO (f)->n_fonts == 1)
|
||||
{
|
||||
FRAME_SMALLEST_CHAR_WIDTH (f) = min_width;
|
||||
FRAME_SMALLEST_FONT_HEIGHT (f) = height;
|
||||
|
@ -2894,8 +2894,8 @@ font_close_object (struct frame *f, Lisp_Object font_object)
|
|||
FONT_ADD_LOG ("close", font_object, Qnil);
|
||||
font->driver->close (f, font);
|
||||
#ifdef HAVE_WINDOW_SYSTEM
|
||||
eassert (FRAME_X_DISPLAY_INFO (f)->n_fonts);
|
||||
FRAME_X_DISPLAY_INFO (f)->n_fonts--;
|
||||
eassert (FRAME_DISPLAY_INFO (f)->n_fonts);
|
||||
FRAME_DISPLAY_INFO (f)->n_fonts--;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
16
src/frame.c
16
src/frame.c
|
@ -2207,7 +2207,7 @@ If FRAME is nil, describe the currently selected 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))
|
||||
|
@ -2598,7 +2598,7 @@ x_fullscreen_adjust (struct frame *f, int *width, int *height, int *top_pos, int
|
|||
{
|
||||
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;
|
||||
|
@ -2973,9 +2973,9 @@ x_report_frame_params (struct frame *f, Lisp_Object *alistptr)
|
|||
(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);
|
||||
|
@ -3631,7 +3631,7 @@ x_get_resource_string (const char *attribute, const char *class)
|
|||
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;
|
||||
|
@ -3753,7 +3753,7 @@ x_frame_get_arg (struct frame *f, Lisp_Object alist, Lisp_Object param,
|
|||
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);
|
||||
}
|
||||
|
||||
|
@ -3767,7 +3767,7 @@ x_frame_get_and_record_arg (struct frame *f, Lisp_Object alist,
|
|||
{
|
||||
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);
|
||||
|
@ -3971,7 +3971,7 @@ x_figure_window_size (struct frame *f, Lisp_Object parms, bool toolbar_p)
|
|||
{
|
||||
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
|
||||
|
|
52
src/frame.h
52
src/frame.h
|
@ -600,36 +600,6 @@ default_pixels_per_inch_y (void)
|
|||
#define FRAME_NS_P(f) ((f)->output_method == output_ns)
|
||||
#endif
|
||||
|
||||
/* Dots per inch of the screen the frame F is on. */
|
||||
|
||||
#ifdef HAVE_X_WINDOWS
|
||||
#define FRAME_RES_X(f) \
|
||||
(eassert (FRAME_X_P (f)), FRAME_X_DISPLAY_INFO (f)->resx)
|
||||
#define FRAME_RES_Y(f) \
|
||||
(eassert (FRAME_X_P (f)), FRAME_X_DISPLAY_INFO (f)->resy)
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_NTGUI
|
||||
#define FRAME_RES_X(f) \
|
||||
(eassert (FRAME_W32_P (f)), FRAME_W32_DISPLAY_INFO (f)->resx)
|
||||
#define FRAME_RES_Y(f) \
|
||||
(eassert (FRAME_W32_P (f)), FRAME_W32_DISPLAY_INFO (f)->resy)
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_NS
|
||||
#define FRAME_RES_X(f) \
|
||||
(eassert (FRAME_NS_P (f)), FRAME_NS_DISPLAY_INFO (f)->resx)
|
||||
#define FRAME_RES_Y(f) \
|
||||
(eassert (FRAME_NS_P (f)), FRAME_NS_DISPLAY_INFO (f)->resy)
|
||||
#endif
|
||||
|
||||
/* Defaults when no window system available. */
|
||||
|
||||
#ifndef FRAME_RES_X
|
||||
#define FRAME_RES_X(f) default_pixels_per_inch_x ()
|
||||
#define FRAME_RES_Y(f) default_pixels_per_inch_y ()
|
||||
#endif
|
||||
|
||||
/* FRAME_WINDOW_P tests whether the frame is a window, and is
|
||||
defined to be the predicate for the window system being used. */
|
||||
|
||||
|
@ -646,14 +616,32 @@ default_pixels_per_inch_y (void)
|
|||
#define FRAME_WINDOW_P(f) ((void) (f), 0)
|
||||
#endif
|
||||
|
||||
/* Dots per inch of the screen the frame F is on. */
|
||||
|
||||
#ifdef HAVE_WINDOW_SYSTEM
|
||||
|
||||
#define FRAME_RES_X(f) \
|
||||
(eassert (FRAME_WINDOW_P (f)), FRAME_DISPLAY_INFO (f)->resx)
|
||||
#define FRAME_RES_Y(f) \
|
||||
(eassert (FRAME_WINDOW_P (f)), FRAME_DISPLAY_INFO (f)->resy)
|
||||
|
||||
#else /* !HAVE_WINDOW_SYSTEM */
|
||||
|
||||
/* Defaults when no window system available. */
|
||||
|
||||
#define FRAME_RES_X(f) default_pixels_per_inch_x ()
|
||||
#define FRAME_RES_Y(f) default_pixels_per_inch_y ()
|
||||
|
||||
#endif /* HAVE_WINDOW_SYSTEM */
|
||||
|
||||
/* Return a pointer to the structure holding information about the
|
||||
region of text, if any, that is currently shown in mouse-face on
|
||||
frame F. We need to define two versions because a TTY-only build
|
||||
does not have FRAME_X_DISPLAY_INFO. */
|
||||
does not have FRAME_DISPLAY_INFO. */
|
||||
#ifdef HAVE_WINDOW_SYSTEM
|
||||
# define MOUSE_HL_INFO(F) \
|
||||
(FRAME_WINDOW_P(F) \
|
||||
? &FRAME_X_DISPLAY_INFO(F)->mouse_highlight \
|
||||
? &FRAME_DISPLAY_INFO(F)->mouse_highlight \
|
||||
: &(F)->output_data.tty->display_info->mouse_highlight)
|
||||
#else
|
||||
# define MOUSE_HL_INFO(F) \
|
||||
|
|
|
@ -2737,7 +2737,7 @@ xg_create_widget (const char *type, const char *name, struct frame *f,
|
|||
{
|
||||
/* Must realize so the GdkWindow inside the widget is created. */
|
||||
gtk_widget_realize (w);
|
||||
xg_set_cursor (w, FRAME_X_DISPLAY_INFO (f)->xg_cursor);
|
||||
xg_set_cursor (w, FRAME_DISPLAY_INFO (f)->xg_cursor);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -3676,7 +3676,7 @@ xg_create_scroll_bar (struct frame *f,
|
|||
|
||||
|
||||
/* Set the cursor to an arrow. */
|
||||
xg_set_cursor (webox, FRAME_X_DISPLAY_INFO (f)->xg_cursor);
|
||||
xg_set_cursor (webox, FRAME_DISPLAY_INFO (f)->xg_cursor);
|
||||
|
||||
bar->x_window = scroll_id;
|
||||
}
|
||||
|
@ -3972,7 +3972,7 @@ xg_tool_bar_callback (GtkWidget *w, gpointer client_data)
|
|||
/* Convert between the modifier bits GDK uses and the modifier bits
|
||||
Emacs uses. This assumes GDK and X masks are the same, which they are when
|
||||
this is written. */
|
||||
event.modifiers = x_x_to_emacs_modifiers (FRAME_X_DISPLAY_INFO (f), mod);
|
||||
event.modifiers = x_x_to_emacs_modifiers (FRAME_DISPLAY_INFO (f), mod);
|
||||
kbd_buffer_store_event (&event);
|
||||
|
||||
/* Return focus to the frame after we have clicked on a detached
|
||||
|
|
30
src/image.c
30
src/image.c
|
@ -161,13 +161,13 @@ XPutPixel (XImagePtr ximage, int x, int y, unsigned long pixel)
|
|||
int
|
||||
x_bitmap_height (struct frame *f, ptrdiff_t id)
|
||||
{
|
||||
return FRAME_X_DISPLAY_INFO (f)->bitmaps[id - 1].height;
|
||||
return FRAME_DISPLAY_INFO (f)->bitmaps[id - 1].height;
|
||||
}
|
||||
|
||||
int
|
||||
x_bitmap_width (struct frame *f, ptrdiff_t id)
|
||||
{
|
||||
return FRAME_X_DISPLAY_INFO (f)->bitmaps[id - 1].width;
|
||||
return FRAME_DISPLAY_INFO (f)->bitmaps[id - 1].width;
|
||||
}
|
||||
|
||||
#if defined (HAVE_X_WINDOWS) || defined (HAVE_NTGUI)
|
||||
|
@ -175,7 +175,7 @@ ptrdiff_t
|
|||
x_bitmap_pixmap (struct frame *f, ptrdiff_t id)
|
||||
{
|
||||
/* HAVE_NTGUI needs the explicit cast here. */
|
||||
return (ptrdiff_t) FRAME_X_DISPLAY_INFO (f)->bitmaps[id - 1].pixmap;
|
||||
return (ptrdiff_t) FRAME_DISPLAY_INFO (f)->bitmaps[id - 1].pixmap;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -183,7 +183,7 @@ x_bitmap_pixmap (struct frame *f, ptrdiff_t id)
|
|||
int
|
||||
x_bitmap_mask (struct frame *f, ptrdiff_t id)
|
||||
{
|
||||
return FRAME_X_DISPLAY_INFO (f)->bitmaps[id - 1].mask;
|
||||
return FRAME_DISPLAY_INFO (f)->bitmaps[id - 1].mask;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -192,7 +192,7 @@ x_bitmap_mask (struct frame *f, ptrdiff_t id)
|
|||
static ptrdiff_t
|
||||
x_allocate_bitmap_record (struct frame *f)
|
||||
{
|
||||
Display_Info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
|
||||
Display_Info *dpyinfo = FRAME_DISPLAY_INFO (f);
|
||||
ptrdiff_t i;
|
||||
|
||||
if (dpyinfo->bitmaps_last < dpyinfo->bitmaps_size)
|
||||
|
@ -213,7 +213,7 @@ x_allocate_bitmap_record (struct frame *f)
|
|||
void
|
||||
x_reference_bitmap (struct frame *f, ptrdiff_t id)
|
||||
{
|
||||
++FRAME_X_DISPLAY_INFO (f)->bitmaps[id - 1].refcount;
|
||||
++FRAME_DISPLAY_INFO (f)->bitmaps[id - 1].refcount;
|
||||
}
|
||||
|
||||
/* Create a bitmap for frame F from a HEIGHT x WIDTH array of bits at BITS. */
|
||||
|
@ -221,7 +221,7 @@ x_reference_bitmap (struct frame *f, ptrdiff_t id)
|
|||
ptrdiff_t
|
||||
x_create_bitmap_from_data (struct frame *f, char *bits, unsigned int width, unsigned int height)
|
||||
{
|
||||
Display_Info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
|
||||
Display_Info *dpyinfo = FRAME_DISPLAY_INFO (f);
|
||||
ptrdiff_t id;
|
||||
|
||||
#ifdef HAVE_X_WINDOWS
|
||||
|
@ -235,8 +235,8 @@ x_create_bitmap_from_data (struct frame *f, char *bits, unsigned int width, unsi
|
|||
#ifdef HAVE_NTGUI
|
||||
Pixmap bitmap;
|
||||
bitmap = CreateBitmap (width, height,
|
||||
FRAME_X_DISPLAY_INFO (XFRAME (frame))->n_planes,
|
||||
FRAME_X_DISPLAY_INFO (XFRAME (frame))->n_cbits,
|
||||
FRAME_DISPLAY_INFO (XFRAME (frame))->n_planes,
|
||||
FRAME_DISPLAY_INFO (XFRAME (frame))->n_cbits,
|
||||
bits);
|
||||
if (! bitmap)
|
||||
return -1;
|
||||
|
@ -280,7 +280,7 @@ x_create_bitmap_from_data (struct frame *f, char *bits, unsigned int width, unsi
|
|||
ptrdiff_t
|
||||
x_create_bitmap_from_file (struct frame *f, Lisp_Object file)
|
||||
{
|
||||
Display_Info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
|
||||
Display_Info *dpyinfo = FRAME_DISPLAY_INFO (f);
|
||||
|
||||
#ifdef HAVE_NTGUI
|
||||
return -1; /* W32_TODO : bitmap support */
|
||||
|
@ -379,7 +379,7 @@ free_bitmap_record (Display_Info *dpyinfo, Bitmap_Record *bm)
|
|||
void
|
||||
x_destroy_bitmap (struct frame *f, ptrdiff_t id)
|
||||
{
|
||||
Display_Info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
|
||||
Display_Info *dpyinfo = FRAME_DISPLAY_INFO (f);
|
||||
|
||||
if (id > 0)
|
||||
{
|
||||
|
@ -454,7 +454,7 @@ x_create_bitmap_mask (struct frame *f, ptrdiff_t id)
|
|||
unsigned long x, y, xp, xm, yp, ym;
|
||||
GC gc;
|
||||
|
||||
Display_Info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
|
||||
Display_Info *dpyinfo = FRAME_DISPLAY_INFO (f);
|
||||
|
||||
if (!(id > 0))
|
||||
return;
|
||||
|
@ -3421,7 +3421,7 @@ xpm_image_p (Lisp_Object object)
|
|||
ptrdiff_t
|
||||
x_create_bitmap_from_xpm_data (struct frame *f, const char **bits)
|
||||
{
|
||||
Display_Info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
|
||||
Display_Info *dpyinfo = FRAME_DISPLAY_INFO (f);
|
||||
ptrdiff_t id;
|
||||
int rc;
|
||||
XpmAttributes attrs;
|
||||
|
@ -4325,7 +4325,7 @@ lookup_rgb_color (struct frame *f, int r, int g, int b)
|
|||
two orders of magnitude. Freeing colors on TrueColor visuals is
|
||||
a nop, and pixel colors specify RGB values directly. See also
|
||||
the Xlib spec, chapter 3.1. */
|
||||
dpyinfo = FRAME_X_DISPLAY_INFO (f);
|
||||
dpyinfo = FRAME_DISPLAY_INFO (f);
|
||||
if (dpyinfo->red_bits > 0)
|
||||
{
|
||||
unsigned long pr, pg, pb;
|
||||
|
@ -4820,7 +4820,7 @@ x_edge_detection (struct frame *f, struct image *img, Lisp_Object matrix,
|
|||
static void
|
||||
x_disable_image (struct frame *f, struct image *img)
|
||||
{
|
||||
Display_Info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
|
||||
Display_Info *dpyinfo = FRAME_DISPLAY_INFO (f);
|
||||
#ifdef HAVE_NTGUI
|
||||
int n_planes = dpyinfo->n_planes * dpyinfo->n_cbits;
|
||||
#else
|
||||
|
|
|
@ -1299,7 +1299,7 @@ no quit occurs and `x-popup-menu' returns nil. */)
|
|||
if (current_popup_menu)
|
||||
{
|
||||
discard_menu_items ();
|
||||
FRAME_X_DISPLAY_INFO (f)->grabbed = 0;
|
||||
FRAME_DISPLAY_INFO (f)->grabbed = 0;
|
||||
UNGCPRO;
|
||||
return Qnil;
|
||||
}
|
||||
|
@ -1338,7 +1338,7 @@ no quit occurs and `x-popup-menu' returns nil. */)
|
|||
#endif
|
||||
|
||||
#ifdef HAVE_NTGUI /* FIXME: Is it really w32-specific? --Stef */
|
||||
FRAME_X_DISPLAY_INFO (f)->grabbed = 0;
|
||||
FRAME_DISPLAY_INFO (f)->grabbed = 0;
|
||||
#endif
|
||||
|
||||
#endif /* HAVE_MENUS */
|
||||
|
|
|
@ -1222,7 +1222,7 @@ IT_cmgoto (struct frame *f)
|
|||
static void
|
||||
IT_update_begin (struct frame *f)
|
||||
{
|
||||
struct tty_display_info *display_info = FRAME_X_DISPLAY_INFO (f);
|
||||
struct tty_display_info *display_info = FRAME_DISPLAY_INFO (f);
|
||||
Mouse_HLInfo *hlinfo = &display_info->mouse_highlight;
|
||||
struct frame *mouse_face_frame = hlinfo->mouse_face_mouse_frame;
|
||||
|
||||
|
@ -1279,7 +1279,7 @@ IT_update_begin (struct frame *f)
|
|||
static void
|
||||
IT_update_end (struct frame *f)
|
||||
{
|
||||
struct tty_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
|
||||
struct tty_display_info *dpyinfo = FRAME_DISPLAY_INFO (f);
|
||||
|
||||
if (dpyinfo->termscript)
|
||||
fprintf (dpyinfo->termscript, "\n<UPDATE_END\n");
|
||||
|
|
|
@ -63,7 +63,7 @@ extern struct tty_display_info the_only_display_info;
|
|||
|
||||
#define FRAME_X_DISPLAY(f) ((Display *) 0)
|
||||
#define FRAME_FONT(f) ((f)->output_data.tty->font)
|
||||
#define FRAME_X_DISPLAY_INFO(f) (&the_only_display_info)
|
||||
#define FRAME_DISPLAY_INFO(f) (&the_only_display_info)
|
||||
|
||||
/* Prototypes. */
|
||||
|
||||
|
|
26
src/nsfns.m
26
src/nsfns.m
|
@ -124,7 +124,7 @@ Updated by Christian Limpach (chris@nice.ch)
|
|||
struct frame *sf = XFRAME (selected_frame);
|
||||
|
||||
if (FRAME_NS_P (sf) && FRAME_LIVE_P (sf))
|
||||
dpyinfo = FRAME_NS_DISPLAY_INFO (sf);
|
||||
dpyinfo = FRAME_DISPLAY_INFO (sf);
|
||||
else if (x_display_list != 0)
|
||||
dpyinfo = x_display_list;
|
||||
else
|
||||
|
@ -144,7 +144,7 @@ Updated by Christian Limpach (chris@nice.ch)
|
|||
else
|
||||
{
|
||||
struct frame *f = decode_window_system_frame (object);
|
||||
dpyinfo = FRAME_NS_DISPLAY_INFO (f);
|
||||
dpyinfo = FRAME_DISPLAY_INFO (f);
|
||||
}
|
||||
|
||||
return dpyinfo;
|
||||
|
@ -992,7 +992,7 @@ Turn the input menu (an NSMenu) into a lisp list for tracking on lisp side
|
|||
if (NILP (Fmemq (frame, Vframe_list)))
|
||||
{
|
||||
#if defined GLYPH_DEBUG && defined ENABLE_CHECKING
|
||||
struct ns_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
|
||||
struct ns_display_info *dpyinfo = FRAME_DISPLAY_INFO (f);
|
||||
#endif
|
||||
|
||||
x_free_frame_resources (f);
|
||||
|
@ -1139,9 +1139,9 @@ Turn the input menu (an NSMenu) into a lisp list for tracking on lisp side
|
|||
if (! STRINGP (f->icon_name))
|
||||
fset_icon_name (f, Qnil);
|
||||
|
||||
FRAME_NS_DISPLAY_INFO (f) = dpyinfo;
|
||||
FRAME_DISPLAY_INFO (f) = dpyinfo;
|
||||
|
||||
/* With FRAME_NS_DISPLAY_INFO set up, this unwind-protect is safe. */
|
||||
/* With FRAME_DISPLAY_INFO set up, this unwind-protect is safe. */
|
||||
record_unwind_protect (unwind_create_frame, frame);
|
||||
|
||||
f->output_data.ns->window_desc = desc_ctr++;
|
||||
|
@ -1152,7 +1152,7 @@ Turn the input menu (an NSMenu) into a lisp list for tracking on lisp side
|
|||
}
|
||||
else
|
||||
{
|
||||
f->output_data.ns->parent_desc = FRAME_NS_DISPLAY_INFO (f)->root_window;
|
||||
f->output_data.ns->parent_desc = FRAME_DISPLAY_INFO (f)->root_window;
|
||||
f->output_data.ns->explicit_parent = 0;
|
||||
}
|
||||
|
||||
|
@ -1255,7 +1255,7 @@ Turn the input menu (an NSMenu) into a lisp list for tracking on lisp side
|
|||
f->output_data.ns->hand_cursor = [NSCursor pointingHandCursor];
|
||||
f->output_data.ns->hourglass_cursor = [NSCursor disappearingItemCursor];
|
||||
f->output_data.ns->horizontal_drag_cursor = [NSCursor resizeLeftRightCursor];
|
||||
FRAME_NS_DISPLAY_INFO (f)->vertical_scroll_bar_cursor
|
||||
FRAME_DISPLAY_INFO (f)->vertical_scroll_bar_cursor
|
||||
= [NSCursor arrowCursor];
|
||||
f->output_data.ns->current_pointer = f->output_data.ns->text_cursor;
|
||||
|
||||
|
@ -1346,7 +1346,7 @@ Turn the input menu (an NSMenu) into a lisp list for tracking on lisp side
|
|||
(Lisp_Object frame)
|
||||
{
|
||||
struct frame *f = decode_window_system_frame (frame);
|
||||
struct ns_display_info *dpyinfo = FRAME_NS_DISPLAY_INFO (f);
|
||||
struct ns_display_info *dpyinfo = FRAME_DISPLAY_INFO (f);
|
||||
|
||||
if (dpyinfo->x_focus_frame != f)
|
||||
{
|
||||
|
@ -2221,7 +2221,7 @@ and GNUstep implementations ("distributor-specific release
|
|||
Lisp_Object
|
||||
x_get_focus_frame (struct frame *frame)
|
||||
{
|
||||
struct ns_display_info *dpyinfo = FRAME_NS_DISPLAY_INFO (frame);
|
||||
struct ns_display_info *dpyinfo = FRAME_DISPLAY_INFO (frame);
|
||||
Lisp_Object nsfocus;
|
||||
|
||||
if (!dpyinfo->x_focus_frame)
|
||||
|
@ -2568,7 +2568,7 @@ and GNUstep implementations ("distributor-specific release
|
|||
{
|
||||
/* Absolute coordinates. */
|
||||
pt.x = XINT (left);
|
||||
pt.y = x_display_pixel_height (FRAME_NS_DISPLAY_INFO (f)) - XINT (top)
|
||||
pt.y = x_display_pixel_height (FRAME_DISPLAY_INFO (f)) - XINT (top)
|
||||
- height;
|
||||
}
|
||||
|
||||
|
@ -2578,7 +2578,7 @@ and GNUstep implementations ("distributor-specific release
|
|||
else if (pt.x + XINT (dx) <= 0)
|
||||
*root_x = 0; /* Can happen for negative dx */
|
||||
else if (pt.x + XINT (dx) + width
|
||||
<= x_display_pixel_width (FRAME_NS_DISPLAY_INFO (f)))
|
||||
<= x_display_pixel_width (FRAME_DISPLAY_INFO (f)))
|
||||
/* It fits to the right of the pointer. */
|
||||
*root_x = pt.x + XINT (dx);
|
||||
else if (width + XINT (dx) <= pt.x)
|
||||
|
@ -2594,12 +2594,12 @@ and GNUstep implementations ("distributor-specific release
|
|||
/* It fits below the pointer. */
|
||||
*root_y = pt.y - height - XINT (dy);
|
||||
else if (pt.y + XINT (dy) + height
|
||||
<= x_display_pixel_height (FRAME_NS_DISPLAY_INFO (f)))
|
||||
<= x_display_pixel_height (FRAME_DISPLAY_INFO (f)))
|
||||
/* It fits above the pointer */
|
||||
*root_y = pt.y + XINT (dy);
|
||||
else
|
||||
/* Put it on the top. */
|
||||
*root_y = x_display_pixel_height (FRAME_NS_DISPLAY_INFO (f)) - height;
|
||||
*root_y = x_display_pixel_height (FRAME_DISPLAY_INFO (f)) - height;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -662,7 +662,7 @@ static int nsfont_draw (struct glyph_string *s, int from, int to, int x, int y,
|
|||
static Lisp_Object
|
||||
nsfont_get_cache (struct frame *frame)
|
||||
{
|
||||
Display_Info *dpyinfo = FRAME_NS_DISPLAY_INFO (frame);
|
||||
Display_Info *dpyinfo = FRAME_DISPLAY_INFO (frame);
|
||||
return (dpyinfo->name_list_element);
|
||||
}
|
||||
|
||||
|
@ -1175,7 +1175,7 @@ is false when (FROM > 0 || TO < S->nchars). */
|
|||
: FRAME_BACKGROUND_COLOR (s->f)) set];
|
||||
else
|
||||
{
|
||||
struct ns_display_info *dpyinfo = FRAME_NS_DISPLAY_INFO (s->f);
|
||||
struct ns_display_info *dpyinfo = FRAME_DISPLAY_INFO (s->f);
|
||||
[[dpyinfo->bitmaps[face->stipple-1].img stippleMask] set];
|
||||
}
|
||||
NSRectFill (br);
|
||||
|
|
14
src/nsterm.h
14
src/nsterm.h
|
@ -678,9 +678,7 @@ struct x_output
|
|||
|
||||
|
||||
/* This gives the ns_display_info structure for the display F is on. */
|
||||
#define FRAME_NS_DISPLAY_INFO(f) ((f)->output_data.ns->display_info)
|
||||
/* the primacy of X must be constantly worked with... */
|
||||
#define FRAME_X_DISPLAY_INFO(f) ((f)->output_data.ns->display_info)
|
||||
#define FRAME_DISPLAY_INFO(f) ((f)->output_data.ns->display_info)
|
||||
#define FRAME_X_OUTPUT(f) ((f)->output_data.ns)
|
||||
#define FRAME_NS_WINDOW(f) ((f)->output_data.ns->window_desc)
|
||||
#define FRAME_X_WINDOW(f) ((f)->output_data.ns->window_desc)
|
||||
|
@ -689,12 +687,12 @@ struct x_output
|
|||
#define FRAME_NS_DISPLAY(f) (0)
|
||||
#define FRAME_X_DISPLAY(f) (0)
|
||||
#define FRAME_X_SCREEN(f) (0)
|
||||
#define FRAME_X_VISUAL(f) FRAME_NS_DISPLAY_INFO(f)->visual
|
||||
#define FRAME_X_VISUAL(f) FRAME_DISPLAY_INFO(f)->visual
|
||||
|
||||
#define FRAME_FOREGROUND_COLOR(f) ((f)->output_data.ns->foreground_color)
|
||||
#define FRAME_BACKGROUND_COLOR(f) ((f)->output_data.ns->background_color)
|
||||
|
||||
#define FRAME_X_IMAGE_CACHE(F) FRAME_NS_DISPLAY_INFO ((F))->image_cache
|
||||
#define FRAME_X_IMAGE_CACHE(F) FRAME_DISPLAY_INFO ((F))->image_cache
|
||||
|
||||
#define NS_FACE_FOREGROUND(f) ((f)->foreground)
|
||||
#define NS_FACE_BACKGROUND(f) ((f)->background)
|
||||
|
@ -744,14 +742,14 @@ struct x_output
|
|||
#define NS_TOP_POS(f) ((f)->top_pos)
|
||||
#endif
|
||||
|
||||
#define FRAME_NS_FONT_TABLE(f) (FRAME_NS_DISPLAY_INFO (f)->font_table)
|
||||
#define FRAME_NS_FONT_TABLE(f) (FRAME_DISPLAY_INFO (f)->font_table)
|
||||
|
||||
#define FRAME_FONTSET(f) ((f)->output_data.ns->fontset)
|
||||
|
||||
#define FRAME_SMALLEST_CHAR_WIDTH(f) \
|
||||
(FRAME_NS_DISPLAY_INFO (f)->smallest_char_width)
|
||||
(FRAME_DISPLAY_INFO (f)->smallest_char_width)
|
||||
#define FRAME_SMALLEST_FONT_HEIGHT(f) \
|
||||
(FRAME_NS_DISPLAY_INFO (f)->smallest_font_height)
|
||||
(FRAME_DISPLAY_INFO (f)->smallest_font_height)
|
||||
#define FRAME_BASELINE_OFFSET(f) ((f)->output_data.ns->baseline_offset)
|
||||
#define BLACK_PIX_DEFAULT(f) 0x000000
|
||||
#define WHITE_PIX_DEFAULT(f) 0xFFFFFF
|
||||
|
|
22
src/nsterm.m
22
src/nsterm.m
|
@ -1007,7 +1007,7 @@ Free a pool and temporary objects it refers to (callable from C)
|
|||
External (hook): called on things like window switching within frame
|
||||
-------------------------------------------------------------------------- */
|
||||
{
|
||||
struct ns_display_info *dpyinfo = FRAME_NS_DISPLAY_INFO (frame);
|
||||
struct ns_display_info *dpyinfo = FRAME_DISPLAY_INFO (frame);
|
||||
struct frame *old_highlight = dpyinfo->x_highlight_frame;
|
||||
|
||||
NSTRACE (ns_frame_rehighlight);
|
||||
|
@ -1104,7 +1104,7 @@ Free a pool and temporary objects it refers to (callable from C)
|
|||
NSTRACE (x_iconify_frame);
|
||||
check_window_system (f);
|
||||
view = FRAME_NS_VIEW (f);
|
||||
dpyinfo = FRAME_NS_DISPLAY_INFO (f);
|
||||
dpyinfo = FRAME_DISPLAY_INFO (f);
|
||||
|
||||
if (dpyinfo->x_highlight_frame == f)
|
||||
dpyinfo->x_highlight_frame = 0;
|
||||
|
@ -1136,7 +1136,7 @@ Free a pool and temporary objects it refers to (callable from C)
|
|||
NSTRACE (x_free_frame_resources);
|
||||
check_window_system (f);
|
||||
view = FRAME_NS_VIEW (f);
|
||||
dpyinfo = FRAME_NS_DISPLAY_INFO (f);
|
||||
dpyinfo = FRAME_DISPLAY_INFO (f);
|
||||
hlinfo = MOUSE_HL_INFO (f);
|
||||
|
||||
[(EmacsView *)view setWindowClosing: YES]; /* may not have been informed */
|
||||
|
@ -1356,7 +1356,7 @@ Free a pool and temporary objects it refers to (callable from C)
|
|||
NSColor *
|
||||
ns_lookup_indexed_color (unsigned long idx, struct frame *f)
|
||||
{
|
||||
struct ns_color_table *color_table = FRAME_NS_DISPLAY_INFO (f)->color_table;
|
||||
struct ns_color_table *color_table = FRAME_DISPLAY_INFO (f)->color_table;
|
||||
if (idx < 1 || idx >= color_table->avail)
|
||||
return nil;
|
||||
return color_table->colors[idx];
|
||||
|
@ -1366,7 +1366,7 @@ Free a pool and temporary objects it refers to (callable from C)
|
|||
unsigned long
|
||||
ns_index_color (NSColor *color, struct frame *f)
|
||||
{
|
||||
struct ns_color_table *color_table = FRAME_NS_DISPLAY_INFO (f)->color_table;
|
||||
struct ns_color_table *color_table = FRAME_DISPLAY_INFO (f)->color_table;
|
||||
ptrdiff_t idx;
|
||||
ptrdiff_t i;
|
||||
|
||||
|
@ -1416,7 +1416,7 @@ Free a pool and temporary objects it refers to (callable from C)
|
|||
if (!f)
|
||||
return;
|
||||
|
||||
color_table = FRAME_NS_DISPLAY_INFO (f)->color_table;
|
||||
color_table = FRAME_DISPLAY_INFO (f)->color_table;
|
||||
|
||||
if (idx <= 0 || idx >= color_table->size) {
|
||||
message1 ("ns_free_indexed_color: Color index out of range.\n");
|
||||
|
@ -1651,7 +1651,7 @@ Free a pool and temporary objects it refers to (callable from C)
|
|||
change the entire-frame transparency
|
||||
-------------------------------------------------------------------------- */
|
||||
{
|
||||
struct ns_display_info *dpyinfo = FRAME_NS_DISPLAY_INFO (f);
|
||||
struct ns_display_info *dpyinfo = FRAME_DISPLAY_INFO (f);
|
||||
double alpha = 1.0;
|
||||
double alpha_min = 1.0;
|
||||
|
||||
|
@ -1786,7 +1786,7 @@ Free a pool and temporary objects it refers to (callable from C)
|
|||
return;
|
||||
}
|
||||
|
||||
dpyinfo = FRAME_NS_DISPLAY_INFO (*fp);
|
||||
dpyinfo = FRAME_DISPLAY_INFO (*fp);
|
||||
|
||||
block_input ();
|
||||
|
||||
|
@ -2877,7 +2877,7 @@ Function modeled after x_draw_glyph_string_box ().
|
|||
: FRAME_BACKGROUND_COLOR (s->f)) set];
|
||||
else
|
||||
{
|
||||
struct ns_display_info *dpyinfo = FRAME_NS_DISPLAY_INFO (s->f);
|
||||
struct ns_display_info *dpyinfo = FRAME_DISPLAY_INFO (s->f);
|
||||
[[dpyinfo->bitmaps[face->stipple-1].img stippleMask] set];
|
||||
}
|
||||
|
||||
|
@ -5705,7 +5705,7 @@ - (void)viewDidEndLiveResize
|
|||
- (void)windowDidBecomeKey: (NSNotification *)notification
|
||||
/* cf. x_detect_focus_change(), x_focus_changed(), x_new_focus_frame() */
|
||||
{
|
||||
struct ns_display_info *dpyinfo = FRAME_NS_DISPLAY_INFO (emacsframe);
|
||||
struct ns_display_info *dpyinfo = FRAME_DISPLAY_INFO (emacsframe);
|
||||
struct frame *old_focus = dpyinfo->x_focus_frame;
|
||||
|
||||
NSTRACE (windowDidBecomeKey);
|
||||
|
@ -5726,7 +5726,7 @@ - (void)windowDidBecomeKey: (NSNotification *)notification
|
|||
- (void)windowDidResignKey: (NSNotification *)notification
|
||||
/* cf. x_detect_focus_change(), x_focus_changed(), x_new_focus_frame() */
|
||||
{
|
||||
struct ns_display_info *dpyinfo = FRAME_NS_DISPLAY_INFO (emacsframe);
|
||||
struct ns_display_info *dpyinfo = FRAME_DISPLAY_INFO (emacsframe);
|
||||
BOOL is_focus_frame = dpyinfo->x_focus_frame == emacsframe;
|
||||
NSTRACE (windowDidResignKey);
|
||||
|
||||
|
|
76
src/w32fns.c
76
src/w32fns.c
|
@ -277,7 +277,7 @@ check_x_display_info (Lisp_Object frame)
|
|||
struct frame *sf = XFRAME (selected_frame);
|
||||
|
||||
if (FRAME_W32_P (sf) && FRAME_LIVE_P (sf))
|
||||
return FRAME_W32_DISPLAY_INFO (sf);
|
||||
return FRAME_DISPLAY_INFO (sf);
|
||||
else
|
||||
return &one_w32_display_info;
|
||||
}
|
||||
|
@ -291,7 +291,7 @@ check_x_display_info (Lisp_Object frame)
|
|||
f = XFRAME (frame);
|
||||
if (! FRAME_W32_P (f))
|
||||
error ("Non-W32 frame used");
|
||||
return FRAME_W32_DISPLAY_INFO (f);
|
||||
return FRAME_DISPLAY_INFO (f);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -307,7 +307,7 @@ x_window_to_frame (struct w32_display_info *dpyinfo, HWND wdesc)
|
|||
FOR_EACH_FRAME (tail, frame)
|
||||
{
|
||||
f = XFRAME (frame);
|
||||
if (!FRAME_W32_P (f) || FRAME_W32_DISPLAY_INFO (f) != dpyinfo)
|
||||
if (!FRAME_W32_P (f) || FRAME_DISPLAY_INFO (f) != dpyinfo)
|
||||
continue;
|
||||
|
||||
if (FRAME_W32_WINDOW (f) == wdesc)
|
||||
|
@ -1027,18 +1027,18 @@ w32_regenerate_palette (struct frame *f)
|
|||
int i;
|
||||
|
||||
/* don't bother trying to create palette if not supported */
|
||||
if (! FRAME_W32_DISPLAY_INFO (f)->has_palette)
|
||||
if (! FRAME_DISPLAY_INFO (f)->has_palette)
|
||||
return;
|
||||
|
||||
log_palette = (LOGPALETTE *)
|
||||
alloca (sizeof (LOGPALETTE) +
|
||||
FRAME_W32_DISPLAY_INFO (f)->num_colors * sizeof (PALETTEENTRY));
|
||||
FRAME_DISPLAY_INFO (f)->num_colors * sizeof (PALETTEENTRY));
|
||||
log_palette->palVersion = 0x300;
|
||||
log_palette->palNumEntries = FRAME_W32_DISPLAY_INFO (f)->num_colors;
|
||||
log_palette->palNumEntries = FRAME_DISPLAY_INFO (f)->num_colors;
|
||||
|
||||
list = FRAME_W32_DISPLAY_INFO (f)->color_list;
|
||||
list = FRAME_DISPLAY_INFO (f)->color_list;
|
||||
for (i = 0;
|
||||
i < FRAME_W32_DISPLAY_INFO (f)->num_colors;
|
||||
i < FRAME_DISPLAY_INFO (f)->num_colors;
|
||||
i++, list = list->next)
|
||||
log_palette->palPalEntry[i] = list->entry;
|
||||
|
||||
|
@ -1046,9 +1046,9 @@ w32_regenerate_palette (struct frame *f)
|
|||
|
||||
enter_crit ();
|
||||
|
||||
if (FRAME_W32_DISPLAY_INFO (f)->palette)
|
||||
DeleteObject (FRAME_W32_DISPLAY_INFO (f)->palette);
|
||||
FRAME_W32_DISPLAY_INFO (f)->palette = new_palette;
|
||||
if (FRAME_DISPLAY_INFO (f)->palette)
|
||||
DeleteObject (FRAME_DISPLAY_INFO (f)->palette);
|
||||
FRAME_DISPLAY_INFO (f)->palette = new_palette;
|
||||
|
||||
/* Realize display palette and garbage all frames. */
|
||||
release_frame_dc (f, get_frame_dc (f));
|
||||
|
@ -1071,7 +1071,7 @@ w32_regenerate_palette (struct frame *f)
|
|||
void
|
||||
w32_map_color (struct frame *f, COLORREF color)
|
||||
{
|
||||
struct w32_palette_entry * list = FRAME_W32_DISPLAY_INFO (f)->color_list;
|
||||
struct w32_palette_entry * list = FRAME_DISPLAY_INFO (f)->color_list;
|
||||
|
||||
if (NILP (Vw32_enable_palette))
|
||||
return;
|
||||
|
@ -1091,19 +1091,19 @@ w32_map_color (struct frame *f, COLORREF color)
|
|||
list = xmalloc (sizeof (struct w32_palette_entry));
|
||||
SET_W32_COLOR (list->entry, color);
|
||||
list->refcount = 1;
|
||||
list->next = FRAME_W32_DISPLAY_INFO (f)->color_list;
|
||||
FRAME_W32_DISPLAY_INFO (f)->color_list = list;
|
||||
FRAME_W32_DISPLAY_INFO (f)->num_colors++;
|
||||
list->next = FRAME_DISPLAY_INFO (f)->color_list;
|
||||
FRAME_DISPLAY_INFO (f)->color_list = list;
|
||||
FRAME_DISPLAY_INFO (f)->num_colors++;
|
||||
|
||||
/* set flag that palette must be regenerated */
|
||||
FRAME_W32_DISPLAY_INFO (f)->regen_palette = TRUE;
|
||||
FRAME_DISPLAY_INFO (f)->regen_palette = TRUE;
|
||||
}
|
||||
|
||||
void
|
||||
w32_unmap_color (struct frame *f, COLORREF color)
|
||||
{
|
||||
struct w32_palette_entry * list = FRAME_W32_DISPLAY_INFO (f)->color_list;
|
||||
struct w32_palette_entry **prev = &FRAME_W32_DISPLAY_INFO (f)->color_list;
|
||||
struct w32_palette_entry * list = FRAME_DISPLAY_INFO (f)->color_list;
|
||||
struct w32_palette_entry **prev = &FRAME_DISPLAY_INFO (f)->color_list;
|
||||
|
||||
if (NILP (Vw32_enable_palette))
|
||||
return;
|
||||
|
@ -1117,7 +1117,7 @@ w32_unmap_color (struct frame *f, COLORREF color)
|
|||
{
|
||||
*prev = list->next;
|
||||
xfree (list);
|
||||
FRAME_W32_DISPLAY_INFO (f)->num_colors--;
|
||||
FRAME_DISPLAY_INFO (f)->num_colors--;
|
||||
break;
|
||||
}
|
||||
else
|
||||
|
@ -1128,7 +1128,7 @@ w32_unmap_color (struct frame *f, COLORREF color)
|
|||
}
|
||||
|
||||
/* set flag that palette must be regenerated */
|
||||
FRAME_W32_DISPLAY_INFO (f)->regen_palette = TRUE;
|
||||
FRAME_DISPLAY_INFO (f)->regen_palette = TRUE;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -1235,7 +1235,7 @@ x_decode_color (struct frame *f, Lisp_Object arg, int def)
|
|||
else if (strcmp (SDATA (arg), "white") == 0)
|
||||
return WHITE_PIX_DEFAULT (f);
|
||||
|
||||
if ((FRAME_W32_DISPLAY_INFO (f)->n_planes * FRAME_W32_DISPLAY_INFO (f)->n_cbits) == 1)
|
||||
if ((FRAME_DISPLAY_INFO (f)->n_planes * FRAME_DISPLAY_INFO (f)->n_cbits) == 1)
|
||||
return def;
|
||||
|
||||
/* w32_defined_color is responsible for coping with failures
|
||||
|
@ -1752,10 +1752,10 @@ x_set_name (struct frame *f, Lisp_Object name, int explicit)
|
|||
{
|
||||
/* Check for no change needed in this very common case
|
||||
before we do any consing. */
|
||||
if (!strcmp (FRAME_W32_DISPLAY_INFO (f)->w32_id_name,
|
||||
if (!strcmp (FRAME_DISPLAY_INFO (f)->w32_id_name,
|
||||
SDATA (f->name)))
|
||||
return;
|
||||
name = build_string (FRAME_W32_DISPLAY_INFO (f)->w32_id_name);
|
||||
name = build_string (FRAME_DISPLAY_INFO (f)->w32_id_name);
|
||||
}
|
||||
else
|
||||
CHECK_STRING (name);
|
||||
|
@ -4232,7 +4232,7 @@ unwind_create_frame (Lisp_Object frame)
|
|||
if (NILP (Fmemq (frame, Vframe_list)))
|
||||
{
|
||||
#ifdef GLYPH_DEBUG
|
||||
struct w32_display_info *dpyinfo = FRAME_W32_DISPLAY_INFO (f);
|
||||
struct w32_display_info *dpyinfo = FRAME_DISPLAY_INFO (f);
|
||||
#endif
|
||||
|
||||
x_free_frame_resources (f);
|
||||
|
@ -4258,7 +4258,7 @@ do_unwind_create_frame (Lisp_Object frame)
|
|||
static void
|
||||
x_default_font_parameter (struct frame *f, Lisp_Object parms)
|
||||
{
|
||||
struct w32_display_info *dpyinfo = FRAME_W32_DISPLAY_INFO (f);
|
||||
struct w32_display_info *dpyinfo = FRAME_DISPLAY_INFO (f);
|
||||
Lisp_Object font_param = x_get_arg (dpyinfo, parms, Qfont, NULL, NULL,
|
||||
RES_TYPE_STRING);
|
||||
Lisp_Object font;
|
||||
|
@ -4392,9 +4392,9 @@ This function is an internal primitive--use `make-frame' instead. */)
|
|||
if (! STRINGP (f->icon_name))
|
||||
fset_icon_name (f, Qnil);
|
||||
|
||||
/* FRAME_W32_DISPLAY_INFO (f) = dpyinfo; */
|
||||
/* FRAME_DISPLAY_INFO (f) = dpyinfo; */
|
||||
|
||||
/* With FRAME_X_DISPLAY_INFO set up, this unwind-protect is safe. */
|
||||
/* With FRAME_DISPLAY_INFO set up, this unwind-protect is safe. */
|
||||
record_unwind_protect (do_unwind_create_frame, frame);
|
||||
#ifdef GLYPH_DEBUG
|
||||
image_cache_refcount =
|
||||
|
@ -4411,7 +4411,7 @@ This function is an internal primitive--use `make-frame' instead. */)
|
|||
}
|
||||
else
|
||||
{
|
||||
f->output_data.w32->parent_desc = FRAME_W32_DISPLAY_INFO (f)->root_window;
|
||||
f->output_data.w32->parent_desc = FRAME_DISPLAY_INFO (f)->root_window;
|
||||
f->output_data.w32->explicit_parent = 0;
|
||||
}
|
||||
|
||||
|
@ -4506,7 +4506,7 @@ This function is an internal primitive--use `make-frame' instead. */)
|
|||
"fullscreen", "Fullscreen", RES_TYPE_SYMBOL);
|
||||
|
||||
f->output_data.w32->dwStyle = WS_OVERLAPPEDWINDOW;
|
||||
f->output_data.w32->parent_desc = FRAME_W32_DISPLAY_INFO (f)->root_window;
|
||||
f->output_data.w32->parent_desc = FRAME_DISPLAY_INFO (f)->root_window;
|
||||
|
||||
f->output_data.w32->text_cursor = w32_load_cursor (IDC_IBEAM);
|
||||
f->output_data.w32->nontext_cursor = w32_load_cursor (IDC_ARROW);
|
||||
|
@ -4529,7 +4529,7 @@ This function is an internal primitive--use `make-frame' instead. */)
|
|||
|
||||
/* Now consider the frame official. */
|
||||
f->terminal->reference_count++;
|
||||
FRAME_W32_DISPLAY_INFO (f)->reference_count++;
|
||||
FRAME_DISPLAY_INFO (f)->reference_count++;
|
||||
Vframe_list = Fcons (frame, Vframe_list);
|
||||
|
||||
/* We need to do this after creating the window, so that the
|
||||
|
@ -4613,7 +4613,7 @@ This function is an internal primitive--use `make-frame' instead. */)
|
|||
Lisp_Object
|
||||
x_get_focus_frame (struct frame *frame)
|
||||
{
|
||||
struct w32_display_info *dpyinfo = FRAME_W32_DISPLAY_INFO (frame);
|
||||
struct w32_display_info *dpyinfo = FRAME_DISPLAY_INFO (frame);
|
||||
Lisp_Object xfocus;
|
||||
if (! dpyinfo->w32_focus_frame)
|
||||
return Qnil;
|
||||
|
@ -5131,7 +5131,7 @@ SOUND is nil to use the normal beep. */)
|
|||
int
|
||||
x_screen_planes (register struct frame *f)
|
||||
{
|
||||
return FRAME_W32_DISPLAY_INFO (f)->n_planes;
|
||||
return FRAME_DISPLAY_INFO (f)->n_planes;
|
||||
}
|
||||
|
||||
/* Return the display structure for the display named NAME.
|
||||
|
@ -5660,7 +5660,7 @@ x_create_tip_frame (struct w32_display_info *dpyinfo,
|
|||
dpyinfo_refcount = dpyinfo->reference_count;
|
||||
#endif /* GLYPH_DEBUG */
|
||||
FRAME_KBOARD (f) = kb;
|
||||
f->output_data.w32->parent_desc = FRAME_W32_DISPLAY_INFO (f)->root_window;
|
||||
f->output_data.w32->parent_desc = FRAME_DISPLAY_INFO (f)->root_window;
|
||||
f->output_data.w32->explicit_parent = 0;
|
||||
|
||||
/* Set the name; the functions to which we pass f expect the name to
|
||||
|
@ -5729,7 +5729,7 @@ x_create_tip_frame (struct w32_display_info *dpyinfo,
|
|||
init_frame_faces (f);
|
||||
|
||||
f->output_data.w32->dwStyle = WS_BORDER | WS_POPUP | WS_DISABLED;
|
||||
f->output_data.w32->parent_desc = FRAME_W32_DISPLAY_INFO (f)->root_window;
|
||||
f->output_data.w32->parent_desc = FRAME_DISPLAY_INFO (f)->root_window;
|
||||
|
||||
window_prompting = x_figure_window_size (f, parms, 0);
|
||||
|
||||
|
@ -5796,7 +5796,7 @@ x_create_tip_frame (struct w32_display_info *dpyinfo,
|
|||
|
||||
/* Now that the frame is official, it counts as a reference to
|
||||
its display. */
|
||||
FRAME_W32_DISPLAY_INFO (f)->reference_count++;
|
||||
FRAME_DISPLAY_INFO (f)->reference_count++;
|
||||
f->terminal->reference_count++;
|
||||
|
||||
/* It is now ok to make the frame official even if we get an error
|
||||
|
@ -5843,8 +5843,8 @@ compute_tip_xy (struct frame *f,
|
|||
/* Default min and max values. */
|
||||
min_x = 0;
|
||||
min_y = 0;
|
||||
max_x = x_display_pixel_width (FRAME_W32_DISPLAY_INFO (f));
|
||||
max_y = x_display_pixel_height (FRAME_W32_DISPLAY_INFO (f));
|
||||
max_x = x_display_pixel_width (FRAME_DISPLAY_INFO (f));
|
||||
max_y = x_display_pixel_height (FRAME_DISPLAY_INFO (f));
|
||||
|
||||
block_input ();
|
||||
GetCursorPos (&pt);
|
||||
|
@ -6030,7 +6030,7 @@ Text larger than the specified size is clipped. */)
|
|||
|
||||
/* Create a frame for the tooltip, and record it in the global
|
||||
variable tip_frame. */
|
||||
frame = x_create_tip_frame (FRAME_W32_DISPLAY_INFO (f), parms, string);
|
||||
frame = x_create_tip_frame (FRAME_DISPLAY_INFO (f), parms, string);
|
||||
f = XFRAME (frame);
|
||||
|
||||
/* Set up the frame's root window. */
|
||||
|
|
|
@ -299,7 +299,7 @@ intern_font_name (char * string)
|
|||
Lisp_Object
|
||||
w32font_get_cache (struct frame *f)
|
||||
{
|
||||
struct w32_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
|
||||
struct w32_display_info *dpyinfo = FRAME_DISPLAY_INFO (f);
|
||||
|
||||
return (dpyinfo->name_list_element);
|
||||
}
|
||||
|
|
|
@ -231,7 +231,7 @@ otherwise it is "Question". */)
|
|||
unblock_input ();
|
||||
|
||||
discard_menu_items ();
|
||||
FRAME_X_DISPLAY_INFO (f)->grabbed = 0;
|
||||
FRAME_DISPLAY_INFO (f)->grabbed = 0;
|
||||
|
||||
if (error_name) error (error_name);
|
||||
return selection;
|
||||
|
@ -883,7 +883,7 @@ w32_menu_show (struct frame *f, int x, int y, int for_click, int keymaps,
|
|||
/* Clean up extraneous mouse events which might have been generated
|
||||
during the call. */
|
||||
discard_mouse_events ();
|
||||
FRAME_X_DISPLAY_INFO (f)->grabbed = 0;
|
||||
FRAME_DISPLAY_INFO (f)->grabbed = 0;
|
||||
|
||||
/* Free the widget_value objects we used to specify the contents. */
|
||||
free_menubar_widget_value_tree (first_wv);
|
||||
|
@ -1123,7 +1123,7 @@ w32_dialog_show (struct frame *f, int keymaps,
|
|||
lw_pop_up_all_widgets (dialog_id);
|
||||
|
||||
/* Process events that apply to the menu. */
|
||||
popup_get_selection ((XEvent *) 0, FRAME_X_DISPLAY_INFO (f), dialog_id);
|
||||
popup_get_selection ((XEvent *) 0, FRAME_DISPLAY_INFO (f), dialog_id);
|
||||
|
||||
lw_destroy_all_widgets (dialog_id);
|
||||
|
||||
|
|
|
@ -477,7 +477,7 @@ w32_clear_window (struct frame *f)
|
|||
void
|
||||
x_set_frame_alpha (struct frame *f)
|
||||
{
|
||||
struct w32_display_info *dpyinfo = FRAME_W32_DISPLAY_INFO (f);
|
||||
struct w32_display_info *dpyinfo = FRAME_DISPLAY_INFO (f);
|
||||
double alpha = 1.0;
|
||||
double alpha_min = 1.0;
|
||||
BYTE opac;
|
||||
|
@ -557,7 +557,7 @@ x_display_pixel_width (struct w32_display_info *dpyinfo)
|
|||
static void
|
||||
x_update_begin (struct frame *f)
|
||||
{
|
||||
struct w32_display_info *display_info = FRAME_W32_DISPLAY_INFO (f);
|
||||
struct w32_display_info *display_info = FRAME_DISPLAY_INFO (f);
|
||||
|
||||
if (! FRAME_W32_P (f))
|
||||
return;
|
||||
|
@ -1003,14 +1003,14 @@ x_set_cursor_gc (struct glyph_string *s)
|
|||
xgcv.font = s->font;
|
||||
mask = GCForeground | GCBackground | GCFont;
|
||||
|
||||
if (FRAME_W32_DISPLAY_INFO (s->f)->scratch_cursor_gc)
|
||||
XChangeGC (NULL, FRAME_W32_DISPLAY_INFO (s->f)->scratch_cursor_gc,
|
||||
if (FRAME_DISPLAY_INFO (s->f)->scratch_cursor_gc)
|
||||
XChangeGC (NULL, FRAME_DISPLAY_INFO (s->f)->scratch_cursor_gc,
|
||||
mask, &xgcv);
|
||||
else
|
||||
FRAME_W32_DISPLAY_INFO (s->f)->scratch_cursor_gc
|
||||
FRAME_DISPLAY_INFO (s->f)->scratch_cursor_gc
|
||||
= XCreateGC (NULL, s->window, mask, &xgcv);
|
||||
|
||||
s->gc = FRAME_W32_DISPLAY_INFO (s->f)->scratch_cursor_gc;
|
||||
s->gc = FRAME_DISPLAY_INFO (s->f)->scratch_cursor_gc;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1052,14 +1052,14 @@ x_set_mouse_face_gc (struct glyph_string *s)
|
|||
xgcv.font = s->font;
|
||||
mask = GCForeground | GCBackground | GCFont;
|
||||
|
||||
if (FRAME_W32_DISPLAY_INFO (s->f)->scratch_cursor_gc)
|
||||
XChangeGC (NULL, FRAME_W32_DISPLAY_INFO (s->f)->scratch_cursor_gc,
|
||||
if (FRAME_DISPLAY_INFO (s->f)->scratch_cursor_gc)
|
||||
XChangeGC (NULL, FRAME_DISPLAY_INFO (s->f)->scratch_cursor_gc,
|
||||
mask, &xgcv);
|
||||
else
|
||||
FRAME_W32_DISPLAY_INFO (s->f)->scratch_cursor_gc
|
||||
FRAME_DISPLAY_INFO (s->f)->scratch_cursor_gc
|
||||
= XCreateGC (NULL, s->window, mask, &xgcv);
|
||||
|
||||
s->gc = FRAME_W32_DISPLAY_INFO (s->f)->scratch_cursor_gc;
|
||||
s->gc = FRAME_DISPLAY_INFO (s->f)->scratch_cursor_gc;
|
||||
}
|
||||
|
||||
eassert (s->gc != 0);
|
||||
|
@ -1623,7 +1623,7 @@ w32_setup_relief_color (struct frame *f, struct relief *relief, double factor,
|
|||
unsigned long mask = GCForeground;
|
||||
COLORREF pixel;
|
||||
COLORREF background = di->relief_background;
|
||||
struct w32_display_info *dpyinfo = FRAME_W32_DISPLAY_INFO (f);
|
||||
struct w32_display_info *dpyinfo = FRAME_DISPLAY_INFO (f);
|
||||
|
||||
/* TODO: Free colors (if using palette)? */
|
||||
|
||||
|
@ -2930,7 +2930,7 @@ w32_frame_rehighlight (struct frame *frame)
|
|||
{
|
||||
if (! FRAME_W32_P (frame))
|
||||
return;
|
||||
x_frame_rehighlight (FRAME_W32_DISPLAY_INFO (frame));
|
||||
x_frame_rehighlight (FRAME_DISPLAY_INFO (frame));
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -3429,7 +3429,7 @@ w32_mouse_position (struct frame **fp, int insist, Lisp_Object *bar_window,
|
|||
/* Now we have a position on the root; find the innermost window
|
||||
containing the pointer. */
|
||||
{
|
||||
if (FRAME_W32_DISPLAY_INFO (*fp)->grabbed && last_mouse_frame
|
||||
if (FRAME_DISPLAY_INFO (*fp)->grabbed && last_mouse_frame
|
||||
&& FRAME_LIVE_P (last_mouse_frame))
|
||||
{
|
||||
/* If mouse was grabbed on a frame, give coords for that frame
|
||||
|
@ -3439,7 +3439,7 @@ w32_mouse_position (struct frame **fp, int insist, Lisp_Object *bar_window,
|
|||
else
|
||||
{
|
||||
/* Is window under mouse one of our frames? */
|
||||
f1 = x_any_window_to_frame (FRAME_W32_DISPLAY_INFO (*fp),
|
||||
f1 = x_any_window_to_frame (FRAME_DISPLAY_INFO (*fp),
|
||||
WindowFromPoint (pt));
|
||||
}
|
||||
|
||||
|
@ -5539,13 +5539,13 @@ x_calc_absolute_position (struct frame *f)
|
|||
/* Treat negative positions as relative to the rightmost bottommost
|
||||
position that fits on the screen. */
|
||||
if (flags & XNegative)
|
||||
f->left_pos = (x_display_pixel_width (FRAME_W32_DISPLAY_INFO (f))
|
||||
f->left_pos = (x_display_pixel_width (FRAME_DISPLAY_INFO (f))
|
||||
- FRAME_PIXEL_WIDTH (f)
|
||||
+ f->left_pos
|
||||
- (left_right_borders_width - 1));
|
||||
|
||||
if (flags & YNegative)
|
||||
f->top_pos = (x_display_pixel_height (FRAME_W32_DISPLAY_INFO (f))
|
||||
f->top_pos = (x_display_pixel_height (FRAME_DISPLAY_INFO (f))
|
||||
- FRAME_PIXEL_HEIGHT (f)
|
||||
+ f->top_pos
|
||||
- (top_bottom_borders_height - 1));
|
||||
|
@ -6013,8 +6013,8 @@ void
|
|||
x_make_frame_invisible (struct frame *f)
|
||||
{
|
||||
/* Don't keep the highlight on an invisible frame. */
|
||||
if (FRAME_W32_DISPLAY_INFO (f)->x_highlight_frame == f)
|
||||
FRAME_W32_DISPLAY_INFO (f)->x_highlight_frame = 0;
|
||||
if (FRAME_DISPLAY_INFO (f)->x_highlight_frame == f)
|
||||
FRAME_DISPLAY_INFO (f)->x_highlight_frame = 0;
|
||||
|
||||
block_input ();
|
||||
|
||||
|
@ -6039,8 +6039,8 @@ x_iconify_frame (struct frame *f)
|
|||
Lisp_Object type;
|
||||
|
||||
/* Don't keep the highlight on an invisible frame. */
|
||||
if (FRAME_W32_DISPLAY_INFO (f)->x_highlight_frame == f)
|
||||
FRAME_W32_DISPLAY_INFO (f)->x_highlight_frame = 0;
|
||||
if (FRAME_DISPLAY_INFO (f)->x_highlight_frame == f)
|
||||
FRAME_DISPLAY_INFO (f)->x_highlight_frame = 0;
|
||||
|
||||
if (FRAME_ICONIFIED_P (f))
|
||||
return;
|
||||
|
@ -6066,7 +6066,7 @@ x_iconify_frame (struct frame *f)
|
|||
void
|
||||
x_free_frame_resources (struct frame *f)
|
||||
{
|
||||
struct w32_display_info *dpyinfo = FRAME_W32_DISPLAY_INFO (f);
|
||||
struct w32_display_info *dpyinfo = FRAME_DISPLAY_INFO (f);
|
||||
Mouse_HLInfo *hlinfo = MOUSE_HL_INFO (f);
|
||||
|
||||
block_input ();
|
||||
|
@ -6116,7 +6116,7 @@ x_free_frame_resources (struct frame *f)
|
|||
void
|
||||
x_destroy_window (struct frame *f)
|
||||
{
|
||||
struct w32_display_info *dpyinfo = FRAME_W32_DISPLAY_INFO (f);
|
||||
struct w32_display_info *dpyinfo = FRAME_DISPLAY_INFO (f);
|
||||
|
||||
x_free_frame_resources (f);
|
||||
dpyinfo->reference_count--;
|
||||
|
|
|
@ -379,8 +379,7 @@ extern struct w32_output w32term_display;
|
|||
#define FRAME_BASELINE_OFFSET(f) ((f)->output_data.w32->baseline_offset)
|
||||
|
||||
/* This gives the w32_display_info structure for the display F is on. */
|
||||
#define FRAME_W32_DISPLAY_INFO(f) (&one_w32_display_info)
|
||||
#define FRAME_X_DISPLAY_INFO(f) (&one_w32_display_info)
|
||||
#define FRAME_DISPLAY_INFO(f) (&one_w32_display_info)
|
||||
|
||||
/* This is the `Display *' which frame F is on. */
|
||||
#define FRAME_X_DISPLAY(f) (0)
|
||||
|
@ -388,12 +387,12 @@ extern struct w32_output w32term_display;
|
|||
/* Value is the smallest width of any character in any font on frame F. */
|
||||
|
||||
#define FRAME_SMALLEST_CHAR_WIDTH(F) \
|
||||
FRAME_W32_DISPLAY_INFO(F)->smallest_char_width
|
||||
FRAME_DISPLAY_INFO(F)->smallest_char_width
|
||||
|
||||
/* Value is the smallest height of any font on frame F. */
|
||||
|
||||
#define FRAME_SMALLEST_FONT_HEIGHT(F) \
|
||||
FRAME_W32_DISPLAY_INFO(F)->smallest_font_height
|
||||
FRAME_DISPLAY_INFO(F)->smallest_font_height
|
||||
|
||||
#define FRAME_NORMAL_PLACEMENT(F) ((F)->output_data.w32->normal_placement)
|
||||
#define FRAME_PREV_FSMODE(F) ((F)->output_data.w32->prev_fsmode)
|
||||
|
|
|
@ -92,7 +92,7 @@ signal_quit (void)
|
|||
void
|
||||
select_palette (struct frame *f, HDC hdc)
|
||||
{
|
||||
struct w32_display_info *display_info = FRAME_W32_DISPLAY_INFO (f);
|
||||
struct w32_display_info *display_info = FRAME_DISPLAY_INFO (f);
|
||||
|
||||
if (!display_info->has_palette)
|
||||
return;
|
||||
|
|
|
@ -525,7 +525,7 @@ setup_frame_gcs (EmacsFrame ew)
|
|||
font = Ffont_xlfd_name (font, Qnil);
|
||||
if (STRINGP (font))
|
||||
{
|
||||
XFontStruct *xfont = XLoadQueryFont (FRAME_X_DISPLAY_INFO (s)->display,
|
||||
XFontStruct *xfont = XLoadQueryFont (FRAME_DISPLAY_INFO (s)->display,
|
||||
SSDATA (font));
|
||||
if (xfont)
|
||||
{
|
||||
|
|
10
src/xdisp.c
10
src/xdisp.c
|
@ -12275,7 +12275,7 @@ note_tool_bar_highlight (struct frame *f, int x, int y)
|
|||
{
|
||||
Lisp_Object window = f->tool_bar_window;
|
||||
struct window *w = XWINDOW (window);
|
||||
Display_Info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
|
||||
Display_Info *dpyinfo = FRAME_DISPLAY_INFO (f);
|
||||
Mouse_HLInfo *hlinfo = MOUSE_HL_INFO (f);
|
||||
int hpos, vpos;
|
||||
struct glyph *glyph;
|
||||
|
@ -26005,7 +26005,7 @@ get_window_cursor_type (struct window *w, struct glyph *glyph, int *width,
|
|||
|
||||
/* Detect a nonselected window or nonselected frame. */
|
||||
else if (w != XWINDOW (f->selected_window)
|
||||
|| f != FRAME_X_DISPLAY_INFO (f)->x_highlight_frame)
|
||||
|| f != FRAME_DISPLAY_INFO (f)->x_highlight_frame)
|
||||
{
|
||||
*active_cursor = 0;
|
||||
|
||||
|
@ -27658,7 +27658,7 @@ define_frame_cursor1 (struct frame *f, Cursor cursor, Lisp_Object pointer)
|
|||
cursor = FRAME_X_OUTPUT (f)->horizontal_drag_cursor;
|
||||
#ifdef HAVE_X_WINDOWS
|
||||
else if (EQ (pointer, intern ("vdrag")))
|
||||
cursor = FRAME_X_DISPLAY_INFO (f)->vertical_scroll_bar_cursor;
|
||||
cursor = FRAME_DISPLAY_INFO (f)->vertical_scroll_bar_cursor;
|
||||
#endif
|
||||
else if (EQ (pointer, intern ("hourglass")))
|
||||
cursor = FRAME_X_OUTPUT (f)->hourglass_cursor;
|
||||
|
@ -27821,7 +27821,7 @@ note_mode_line_or_margin_highlight (Lisp_Object window, int x, int y,
|
|||
/* Change the mouse pointer according to what is under it. */
|
||||
if (FRAME_WINDOW_P (f))
|
||||
{
|
||||
dpyinfo = FRAME_X_DISPLAY_INFO (f);
|
||||
dpyinfo = FRAME_DISPLAY_INFO (f);
|
||||
if (STRINGP (string))
|
||||
{
|
||||
cursor = FRAME_X_OUTPUT (f)->nontext_cursor;
|
||||
|
@ -27843,7 +27843,7 @@ note_mode_line_or_margin_highlight (Lisp_Object window, int x, int y,
|
|||
}
|
||||
else
|
||||
/* Default mode-line pointer. */
|
||||
cursor = FRAME_X_DISPLAY_INFO (f)->vertical_scroll_bar_cursor;
|
||||
cursor = FRAME_DISPLAY_INFO (f)->vertical_scroll_bar_cursor;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
|
12
src/xfaces.c
12
src/xfaces.c
|
@ -224,15 +224,11 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
|
|||
#include TERM_HEADER
|
||||
#include "fontset.h"
|
||||
#ifdef HAVE_NTGUI
|
||||
#undef FRAME_X_DISPLAY_INFO
|
||||
#define FRAME_X_DISPLAY_INFO FRAME_W32_DISPLAY_INFO
|
||||
#define x_display_info w32_display_info
|
||||
#define GCGraphicsExposures 0
|
||||
#endif /* HAVE_NTGUI */
|
||||
|
||||
#ifdef HAVE_NS
|
||||
#undef FRAME_X_DISPLAY_INFO
|
||||
#define FRAME_X_DISPLAY_INFO FRAME_NS_DISPLAY_INFO
|
||||
#define GCGraphicsExposures 0
|
||||
#endif /* HAVE_NS */
|
||||
|
||||
|
@ -546,7 +542,7 @@ DEFUN ("dump-colors", Fdump_colors, Sdump_colors, 0, 0, 0,
|
|||
void
|
||||
x_free_colors (struct frame *f, long unsigned int *pixels, int npixels)
|
||||
{
|
||||
int class = FRAME_X_DISPLAY_INFO (f)->visual->class;
|
||||
int class = FRAME_DISPLAY_INFO (f)->visual->class;
|
||||
|
||||
/* If display has an immutable color map, freeing colors is not
|
||||
necessary and some servers don't allow it. So don't do it. */
|
||||
|
@ -767,7 +763,7 @@ clear_face_cache (int clear_fonts_p)
|
|||
{
|
||||
struct frame *f = XFRAME (frame);
|
||||
if (FRAME_WINDOW_P (f)
|
||||
&& FRAME_X_DISPLAY_INFO (f)->n_fonts > CLEAR_FONT_TABLE_NFONTS)
|
||||
&& FRAME_DISPLAY_INFO (f)->n_fonts > CLEAR_FONT_TABLE_NFONTS)
|
||||
{
|
||||
clear_font_cache (f);
|
||||
free_all_realized_faces (frame);
|
||||
|
@ -3400,7 +3396,7 @@ ordinary `x-get-resource' doesn't take a frame argument. */)
|
|||
CHECK_STRING (class);
|
||||
f = decode_live_frame (frame);
|
||||
block_input ();
|
||||
value = display_x_get_resource (FRAME_X_DISPLAY_INFO (f),
|
||||
value = display_x_get_resource (FRAME_DISPLAY_INFO (f),
|
||||
resource, class, Qnil, Qnil);
|
||||
unblock_input ();
|
||||
return value;
|
||||
|
@ -3490,7 +3486,7 @@ DEFUN ("internal-set-lisp-face-attribute-from-resource",
|
|||
static void
|
||||
x_update_menu_appearance (struct frame *f)
|
||||
{
|
||||
struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
|
||||
struct x_display_info *dpyinfo = FRAME_DISPLAY_INFO (f);
|
||||
XrmDatabase rdb;
|
||||
|
||||
if (dpyinfo
|
||||
|
|
122
src/xfns.c
122
src/xfns.c
|
@ -153,7 +153,7 @@ check_x_display_info (Lisp_Object object)
|
|||
struct frame *sf = XFRAME (selected_frame);
|
||||
|
||||
if (FRAME_X_P (sf) && FRAME_LIVE_P (sf))
|
||||
dpyinfo = FRAME_X_DISPLAY_INFO (sf);
|
||||
dpyinfo = FRAME_DISPLAY_INFO (sf);
|
||||
else if (x_display_list != 0)
|
||||
dpyinfo = x_display_list;
|
||||
else
|
||||
|
@ -173,7 +173,7 @@ check_x_display_info (Lisp_Object object)
|
|||
else
|
||||
{
|
||||
struct frame *f = decode_window_system_frame (object);
|
||||
dpyinfo = FRAME_X_DISPLAY_INFO (f);
|
||||
dpyinfo = FRAME_DISPLAY_INFO (f);
|
||||
}
|
||||
|
||||
return dpyinfo;
|
||||
|
@ -193,7 +193,7 @@ x_real_positions (struct frame *f, int *xptr, int *yptr)
|
|||
Atom actual_type;
|
||||
unsigned long actual_size, bytes_remaining;
|
||||
int rc, actual_format;
|
||||
struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
|
||||
struct x_display_info *dpyinfo = FRAME_DISPLAY_INFO (f);
|
||||
long max_len = 400;
|
||||
Display *dpy = FRAME_X_DISPLAY (f);
|
||||
unsigned char *tmp_data = NULL;
|
||||
|
@ -256,7 +256,7 @@ x_real_positions (struct frame *f, int *xptr, int *yptr)
|
|||
XTranslateCoordinates (FRAME_X_DISPLAY (f),
|
||||
|
||||
/* From-window, to-window. */
|
||||
FRAME_X_DISPLAY_INFO (f)->root_window,
|
||||
FRAME_DISPLAY_INFO (f)->root_window,
|
||||
FRAME_X_WINDOW (f),
|
||||
|
||||
/* From-position, to-position. */
|
||||
|
@ -275,7 +275,7 @@ x_real_positions (struct frame *f, int *xptr, int *yptr)
|
|||
XTranslateCoordinates (FRAME_X_DISPLAY (f),
|
||||
|
||||
/* From-window, to-window. */
|
||||
FRAME_X_DISPLAY_INFO (f)->root_window,
|
||||
FRAME_DISPLAY_INFO (f)->root_window,
|
||||
FRAME_OUTER_WINDOW (f),
|
||||
|
||||
/* From-position, to-position. */
|
||||
|
@ -396,7 +396,7 @@ x_decode_color (struct frame *f, Lisp_Object color_name, int mono_color)
|
|||
#endif
|
||||
|
||||
/* Return MONO_COLOR for monochrome frames. */
|
||||
if (FRAME_X_DISPLAY_INFO (f)->n_planes == 1)
|
||||
if (FRAME_DISPLAY_INFO (f)->n_planes == 1)
|
||||
return mono_color;
|
||||
|
||||
/* x_defined_color is responsible for coping with failures
|
||||
|
@ -589,7 +589,7 @@ make_invisible_cursor (struct frame *f)
|
|||
Cursor c = 0;
|
||||
|
||||
x_catch_errors (dpy);
|
||||
pix = XCreateBitmapFromData (dpy, FRAME_X_DISPLAY_INFO (f)->root_window,
|
||||
pix = XCreateBitmapFromData (dpy, FRAME_DISPLAY_INFO (f)->root_window,
|
||||
no_data, 1, 1);
|
||||
if (! x_had_errors_p (dpy) && pix != None)
|
||||
{
|
||||
|
@ -714,8 +714,8 @@ x_set_mouse_color (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
|
|||
XDefineCursor (dpy, FRAME_X_WINDOW (f),
|
||||
f->output_data.x->current_cursor = cursor);
|
||||
|
||||
if (FRAME_X_DISPLAY_INFO (f)->invisible_cursor == 0)
|
||||
FRAME_X_DISPLAY_INFO (f)->invisible_cursor = make_invisible_cursor (f);
|
||||
if (FRAME_DISPLAY_INFO (f)->invisible_cursor == 0)
|
||||
FRAME_DISPLAY_INFO (f)->invisible_cursor = make_invisible_cursor (f);
|
||||
|
||||
if (cursor != x->text_cursor
|
||||
&& x->text_cursor != 0)
|
||||
|
@ -1308,7 +1308,7 @@ x_set_name_internal (struct frame *f, Lisp_Object name)
|
|||
text.value = x_encode_text (name, coding_system, 0, &bytes, &stringp,
|
||||
&do_free_text_value);
|
||||
text.encoding = (stringp ? XA_STRING
|
||||
: FRAME_X_DISPLAY_INFO (f)->Xatom_COMPOUND_TEXT);
|
||||
: FRAME_DISPLAY_INFO (f)->Xatom_COMPOUND_TEXT);
|
||||
text.format = 8;
|
||||
text.nitems = bytes;
|
||||
if (text.nitems != bytes)
|
||||
|
@ -1325,7 +1325,7 @@ x_set_name_internal (struct frame *f, Lisp_Object name)
|
|||
icon.value = x_encode_text (f->icon_name, coding_system, 0,
|
||||
&bytes, &stringp, &do_free_icon_value);
|
||||
icon.encoding = (stringp ? XA_STRING
|
||||
: FRAME_X_DISPLAY_INFO (f)->Xatom_COMPOUND_TEXT);
|
||||
: FRAME_DISPLAY_INFO (f)->Xatom_COMPOUND_TEXT);
|
||||
icon.format = 8;
|
||||
icon.nitems = bytes;
|
||||
if (icon.nitems != bytes)
|
||||
|
@ -1340,8 +1340,8 @@ x_set_name_internal (struct frame *f, Lisp_Object name)
|
|||
#else /* not USE_GTK */
|
||||
XSetWMName (FRAME_X_DISPLAY (f), FRAME_OUTER_WINDOW (f), &text);
|
||||
XChangeProperty (FRAME_X_DISPLAY (f), FRAME_OUTER_WINDOW (f),
|
||||
FRAME_X_DISPLAY_INFO (f)->Xatom_net_wm_name,
|
||||
FRAME_X_DISPLAY_INFO (f)->Xatom_UTF8_STRING,
|
||||
FRAME_DISPLAY_INFO (f)->Xatom_net_wm_name,
|
||||
FRAME_DISPLAY_INFO (f)->Xatom_UTF8_STRING,
|
||||
8, PropModeReplace,
|
||||
SDATA (encoded_name),
|
||||
SBYTES (encoded_name));
|
||||
|
@ -1349,8 +1349,8 @@ x_set_name_internal (struct frame *f, Lisp_Object name)
|
|||
|
||||
XSetWMIconName (FRAME_X_DISPLAY (f), FRAME_OUTER_WINDOW (f), &icon);
|
||||
XChangeProperty (FRAME_X_DISPLAY (f), FRAME_OUTER_WINDOW (f),
|
||||
FRAME_X_DISPLAY_INFO (f)->Xatom_net_wm_icon_name,
|
||||
FRAME_X_DISPLAY_INFO (f)->Xatom_UTF8_STRING,
|
||||
FRAME_DISPLAY_INFO (f)->Xatom_net_wm_icon_name,
|
||||
FRAME_DISPLAY_INFO (f)->Xatom_UTF8_STRING,
|
||||
8, PropModeReplace,
|
||||
SDATA (encoded_icon_name),
|
||||
SBYTES (encoded_icon_name));
|
||||
|
@ -1397,10 +1397,10 @@ x_set_name (struct frame *f, Lisp_Object name, int explicit)
|
|||
{
|
||||
/* Check for no change needed in this very common case
|
||||
before we do any consing. */
|
||||
if (!strcmp (FRAME_X_DISPLAY_INFO (f)->x_id_name,
|
||||
if (!strcmp (FRAME_DISPLAY_INFO (f)->x_id_name,
|
||||
SSDATA (f->name)))
|
||||
return;
|
||||
name = build_string (FRAME_X_DISPLAY_INFO (f)->x_id_name);
|
||||
name = build_string (FRAME_DISPLAY_INFO (f)->x_id_name);
|
||||
}
|
||||
else
|
||||
CHECK_STRING (name);
|
||||
|
@ -1496,7 +1496,7 @@ x_default_scroll_bar_color_parameter (struct frame *f,
|
|||
const char *xprop, const char *xclass,
|
||||
int foreground_p)
|
||||
{
|
||||
struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
|
||||
struct x_display_info *dpyinfo = FRAME_DISPLAY_INFO (f);
|
||||
Lisp_Object tem;
|
||||
|
||||
tem = x_get_arg (dpyinfo, alist, prop, xprop, xclass, RES_TYPE_STRING);
|
||||
|
@ -1562,7 +1562,7 @@ hack_wm_protocols (struct frame *f, Widget widget)
|
|||
unsigned long bytes_after;
|
||||
|
||||
if ((XGetWindowProperty (dpy, w,
|
||||
FRAME_X_DISPLAY_INFO (f)->Xatom_wm_protocols,
|
||||
FRAME_DISPLAY_INFO (f)->Xatom_wm_protocols,
|
||||
(long)0, (long)100, False, XA_ATOM,
|
||||
&type, &format, &nitems, &bytes_after,
|
||||
&catoms)
|
||||
|
@ -1574,13 +1574,13 @@ hack_wm_protocols (struct frame *f, Widget widget)
|
|||
{
|
||||
nitems--;
|
||||
if (atoms[nitems]
|
||||
== FRAME_X_DISPLAY_INFO (f)->Xatom_wm_delete_window)
|
||||
== FRAME_DISPLAY_INFO (f)->Xatom_wm_delete_window)
|
||||
need_delete = 0;
|
||||
else if (atoms[nitems]
|
||||
== FRAME_X_DISPLAY_INFO (f)->Xatom_wm_take_focus)
|
||||
== FRAME_DISPLAY_INFO (f)->Xatom_wm_take_focus)
|
||||
need_focus = 0;
|
||||
else if (atoms[nitems]
|
||||
== FRAME_X_DISPLAY_INFO (f)->Xatom_wm_save_yourself)
|
||||
== FRAME_DISPLAY_INFO (f)->Xatom_wm_save_yourself)
|
||||
need_save = 0;
|
||||
}
|
||||
}
|
||||
|
@ -1591,13 +1591,13 @@ hack_wm_protocols (struct frame *f, Widget widget)
|
|||
Atom props [10];
|
||||
int count = 0;
|
||||
if (need_delete)
|
||||
props[count++] = FRAME_X_DISPLAY_INFO (f)->Xatom_wm_delete_window;
|
||||
props[count++] = FRAME_DISPLAY_INFO (f)->Xatom_wm_delete_window;
|
||||
if (need_focus)
|
||||
props[count++] = FRAME_X_DISPLAY_INFO (f)->Xatom_wm_take_focus;
|
||||
props[count++] = FRAME_DISPLAY_INFO (f)->Xatom_wm_take_focus;
|
||||
if (need_save)
|
||||
props[count++] = FRAME_X_DISPLAY_INFO (f)->Xatom_wm_save_yourself;
|
||||
props[count++] = FRAME_DISPLAY_INFO (f)->Xatom_wm_save_yourself;
|
||||
if (count)
|
||||
XChangeProperty (dpy, w, FRAME_X_DISPLAY_INFO (f)->Xatom_wm_protocols,
|
||||
XChangeProperty (dpy, w, FRAME_DISPLAY_INFO (f)->Xatom_wm_protocols,
|
||||
XA_ATOM, 32, PropModeAppend,
|
||||
(unsigned char *) props, count);
|
||||
}
|
||||
|
@ -1792,7 +1792,7 @@ xic_create_xfontset (struct frame *f)
|
|||
struct frame *cf = XFRAME (frame);
|
||||
|
||||
if (cf != f && FRAME_LIVE_P (f) && FRAME_X_P (cf)
|
||||
&& FRAME_X_DISPLAY_INFO (cf) == FRAME_X_DISPLAY_INFO (f)
|
||||
&& FRAME_DISPLAY_INFO (cf) == FRAME_DISPLAY_INFO (f)
|
||||
&& FRAME_FONT (f)
|
||||
&& FRAME_FONT (f)->pixel_size == pixel_size)
|
||||
{
|
||||
|
@ -1891,7 +1891,7 @@ xic_free_xfontset (struct frame *f)
|
|||
{
|
||||
struct frame *cf = XFRAME (frame);
|
||||
if (cf != f && FRAME_LIVE_P (f) && FRAME_X_P (cf)
|
||||
&& FRAME_X_DISPLAY_INFO (cf) == FRAME_X_DISPLAY_INFO (f)
|
||||
&& FRAME_DISPLAY_INFO (cf) == FRAME_DISPLAY_INFO (f)
|
||||
&& FRAME_XIC_FONTSET (cf) == FRAME_XIC_FONTSET (f))
|
||||
{
|
||||
shared_p = 1;
|
||||
|
@ -2136,7 +2136,7 @@ x_window (struct frame *f, long window_prompting, int minibuffer_only)
|
|||
XtSetArg (al[ac], XtNmappedWhenManaged, 0); ac++;
|
||||
XtSetArg (al[ac], XtNborderWidth, f->border_width); ac++;
|
||||
XtSetArg (al[ac], XtNvisual, FRAME_X_VISUAL (f)); ac++;
|
||||
XtSetArg (al[ac], XtNdepth, FRAME_X_DISPLAY_INFO (f)->n_planes); ac++;
|
||||
XtSetArg (al[ac], XtNdepth, FRAME_DISPLAY_INFO (f)->n_planes); ac++;
|
||||
XtSetArg (al[ac], XtNcolormap, FRAME_X_COLORMAP (f)); ac++;
|
||||
shell_widget = XtAppCreateShell (f->namebuf, EMACS_CLASS,
|
||||
applicationShellWidgetClass,
|
||||
|
@ -2151,7 +2151,7 @@ x_window (struct frame *f, long window_prompting, int minibuffer_only)
|
|||
|
||||
ac = 0;
|
||||
XtSetArg (al[ac], XtNvisual, FRAME_X_VISUAL (f)); ac++;
|
||||
XtSetArg (al[ac], XtNdepth, FRAME_X_DISPLAY_INFO (f)->n_planes); ac++;
|
||||
XtSetArg (al[ac], XtNdepth, FRAME_DISPLAY_INFO (f)->n_planes); ac++;
|
||||
XtSetArg (al[ac], XtNcolormap, FRAME_X_COLORMAP (f)); ac++;
|
||||
XtSetArg (al[ac], XtNborderWidth, 0); ac++;
|
||||
XtSetValues (pane_widget, al, ac);
|
||||
|
@ -2167,7 +2167,7 @@ x_window (struct frame *f, long window_prompting, int minibuffer_only)
|
|||
XtSetArg (al[ac], XtNresizeToPreferred, 1); ac++;
|
||||
XtSetArg (al[ac], XtNemacsFrame, f); ac++;
|
||||
XtSetArg (al[ac], XtNvisual, FRAME_X_VISUAL (f)); ac++;
|
||||
XtSetArg (al[ac], XtNdepth, FRAME_X_DISPLAY_INFO (f)->n_planes); ac++;
|
||||
XtSetArg (al[ac], XtNdepth, FRAME_DISPLAY_INFO (f)->n_planes); ac++;
|
||||
XtSetArg (al[ac], XtNcolormap, FRAME_X_COLORMAP (f)); ac++;
|
||||
XtSetArg (al[ac], XtNborderWidth, 0); ac++;
|
||||
frame_widget = XtCreateWidget (f->namebuf, emacsFrameClass, pane_widget,
|
||||
|
@ -2293,7 +2293,7 @@ x_window (struct frame *f, long window_prompting, int minibuffer_only)
|
|||
be initialized to something relevant to the time we created the window.
|
||||
*/
|
||||
XChangeProperty (XtDisplay (frame_widget), XtWindow (frame_widget),
|
||||
FRAME_X_DISPLAY_INFO (f)->Xatom_wm_protocols,
|
||||
FRAME_DISPLAY_INFO (f)->Xatom_wm_protocols,
|
||||
XA_ATOM, 32, PropModeAppend, NULL, 0);
|
||||
|
||||
/* Make all the standard events reach the Emacs frame. */
|
||||
|
@ -2453,8 +2453,8 @@ x_window (struct frame *f)
|
|||
/* Request "save yourself" and "delete window" commands from wm. */
|
||||
{
|
||||
Atom protocols[2];
|
||||
protocols[0] = FRAME_X_DISPLAY_INFO (f)->Xatom_wm_delete_window;
|
||||
protocols[1] = FRAME_X_DISPLAY_INFO (f)->Xatom_wm_save_yourself;
|
||||
protocols[0] = FRAME_DISPLAY_INFO (f)->Xatom_wm_delete_window;
|
||||
protocols[1] = FRAME_DISPLAY_INFO (f)->Xatom_wm_save_yourself;
|
||||
XSetWMProtocols (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), protocols, 2);
|
||||
}
|
||||
|
||||
|
@ -2514,7 +2514,7 @@ x_icon (struct frame *f, Lisp_Object parms)
|
|||
{
|
||||
Lisp_Object icon_x, icon_y;
|
||||
#if 0
|
||||
struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
|
||||
struct x_display_info *dpyinfo = FRAME_DISPLAY_INFO (f);
|
||||
#endif
|
||||
|
||||
/* Set the position of the icon. Note that twm groups all
|
||||
|
@ -2598,7 +2598,7 @@ x_make_gc (struct frame *f)
|
|||
this must be done on a per-frame basis. */
|
||||
f->output_data.x->border_tile
|
||||
= (XCreatePixmapFromBitmapData
|
||||
(FRAME_X_DISPLAY (f), FRAME_X_DISPLAY_INFO (f)->root_window,
|
||||
(FRAME_X_DISPLAY (f), FRAME_DISPLAY_INFO (f)->root_window,
|
||||
gray_bits, gray_width, gray_height,
|
||||
FRAME_FOREGROUND_PIXEL (f),
|
||||
FRAME_BACKGROUND_PIXEL (f),
|
||||
|
@ -2664,7 +2664,7 @@ unwind_create_frame (Lisp_Object frame)
|
|||
if (NILP (Fmemq (frame, Vframe_list)))
|
||||
{
|
||||
#if defined GLYPH_DEBUG && defined ENABLE_CHECKING
|
||||
struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
|
||||
struct x_display_info *dpyinfo = FRAME_DISPLAY_INFO (f);
|
||||
#endif
|
||||
|
||||
x_free_frame_resources (f);
|
||||
|
@ -2696,7 +2696,7 @@ unwind_create_frame_1 (Lisp_Object val)
|
|||
static void
|
||||
x_default_font_parameter (struct frame *f, Lisp_Object parms)
|
||||
{
|
||||
struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
|
||||
struct x_display_info *dpyinfo = FRAME_DISPLAY_INFO (f);
|
||||
Lisp_Object font_param = x_get_arg (dpyinfo, parms, Qfont, NULL, NULL,
|
||||
RES_TYPE_STRING);
|
||||
Lisp_Object font = Qnil;
|
||||
|
@ -2890,9 +2890,9 @@ This function is an internal primitive--use `make-frame' instead. */)
|
|||
if (! STRINGP (f->icon_name))
|
||||
fset_icon_name (f, Qnil);
|
||||
|
||||
FRAME_X_DISPLAY_INFO (f) = dpyinfo;
|
||||
FRAME_DISPLAY_INFO (f) = dpyinfo;
|
||||
|
||||
/* With FRAME_X_DISPLAY_INFO set up, this unwind-protect is safe. */
|
||||
/* With FRAME_DISPLAY_INFO set up, this unwind-protect is safe. */
|
||||
record_unwind_protect (do_unwind_create_frame, frame);
|
||||
|
||||
/* These colors will be set anyway later, but it's important
|
||||
|
@ -2937,7 +2937,7 @@ This function is an internal primitive--use `make-frame' instead. */)
|
|||
}
|
||||
else
|
||||
{
|
||||
f->output_data.x->parent_desc = FRAME_X_DISPLAY_INFO (f)->root_window;
|
||||
f->output_data.x->parent_desc = FRAME_DISPLAY_INFO (f)->root_window;
|
||||
f->output_data.x->explicit_parent = 0;
|
||||
}
|
||||
|
||||
|
@ -3108,7 +3108,7 @@ This function is an internal primitive--use `make-frame' instead. */)
|
|||
|
||||
/* Now consider the frame official. */
|
||||
f->terminal->reference_count++;
|
||||
FRAME_X_DISPLAY_INFO (f)->reference_count++;
|
||||
FRAME_DISPLAY_INFO (f)->reference_count++;
|
||||
Vframe_list = Fcons (frame, Vframe_list);
|
||||
|
||||
/* We need to do this after creating the X window, so that the
|
||||
|
@ -3233,7 +3233,7 @@ This function is an internal primitive--use `make-frame' instead. */)
|
|||
Lisp_Object
|
||||
x_get_focus_frame (struct frame *frame)
|
||||
{
|
||||
struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (frame);
|
||||
struct x_display_info *dpyinfo = FRAME_DISPLAY_INFO (frame);
|
||||
Lisp_Object xfocus;
|
||||
if (! dpyinfo->x_focus_frame)
|
||||
return Qnil;
|
||||
|
@ -3761,7 +3761,7 @@ x_make_monitor_attribute_list (struct MonitorInfo *monitors,
|
|||
{
|
||||
struct frame *f = XFRAME (frame);
|
||||
|
||||
if (FRAME_X_P (f) && FRAME_X_DISPLAY_INFO (f) == dpyinfo
|
||||
if (FRAME_X_P (f) && FRAME_DISPLAY_INFO (f) == dpyinfo
|
||||
&& !EQ (frame, tip_frame))
|
||||
{
|
||||
int i = x_get_monitor_for_frame (f, monitors, n_monitors);
|
||||
|
@ -4041,7 +4041,7 @@ Internal use only, use `display-monitor-attributes-list' instead. */)
|
|||
{
|
||||
struct frame *f = XFRAME (frame);
|
||||
|
||||
if (FRAME_X_P (f) && FRAME_X_DISPLAY_INFO (f) == dpyinfo
|
||||
if (FRAME_X_P (f) && FRAME_DISPLAY_INFO (f) == dpyinfo
|
||||
&& !EQ (frame, tip_frame))
|
||||
{
|
||||
GdkWindow *gwin = gtk_widget_get_window (FRAME_GTK_WIDGET (f));
|
||||
|
@ -4542,7 +4542,7 @@ no value of TYPE (always string in the MS Windows case). */)
|
|||
{
|
||||
CONS_TO_INTEGER (source, Window, target_window);
|
||||
if (! target_window)
|
||||
target_window = FRAME_X_DISPLAY_INFO (f)->root_window;
|
||||
target_window = FRAME_DISPLAY_INFO (f)->root_window;
|
||||
}
|
||||
|
||||
block_input ();
|
||||
|
@ -4838,8 +4838,8 @@ x_create_tip_frame (struct x_display_info *dpyinfo,
|
|||
f->output_data.x->scroll_bar_bottom_shadow_pixel = -1;
|
||||
#endif /* USE_TOOLKIT_SCROLL_BARS */
|
||||
fset_icon_name (f, Qnil);
|
||||
FRAME_X_DISPLAY_INFO (f) = dpyinfo;
|
||||
f->output_data.x->parent_desc = FRAME_X_DISPLAY_INFO (f)->root_window;
|
||||
FRAME_DISPLAY_INFO (f) = dpyinfo;
|
||||
f->output_data.x->parent_desc = FRAME_DISPLAY_INFO (f)->root_window;
|
||||
f->output_data.x->explicit_parent = 0;
|
||||
|
||||
/* These colors will be set anyway later, but it's important
|
||||
|
@ -4953,14 +4953,14 @@ x_create_tip_frame (struct x_display_info *dpyinfo,
|
|||
happen. */
|
||||
init_frame_faces (f);
|
||||
|
||||
f->output_data.x->parent_desc = FRAME_X_DISPLAY_INFO (f)->root_window;
|
||||
f->output_data.x->parent_desc = FRAME_DISPLAY_INFO (f)->root_window;
|
||||
|
||||
x_figure_window_size (f, parms, 0);
|
||||
|
||||
{
|
||||
XSetWindowAttributes attrs;
|
||||
unsigned long mask;
|
||||
Atom type = FRAME_X_DISPLAY_INFO (f)->Xatom_net_window_type_tooltip;
|
||||
Atom type = FRAME_DISPLAY_INFO (f)->Xatom_net_window_type_tooltip;
|
||||
|
||||
block_input ();
|
||||
mask = CWBackPixel | CWOverrideRedirect | CWEventMask;
|
||||
|
@ -4978,7 +4978,7 @@ x_create_tip_frame (struct x_display_info *dpyinfo,
|
|||
tip_window
|
||||
= FRAME_X_WINDOW (f)
|
||||
= XCreateWindow (FRAME_X_DISPLAY (f),
|
||||
FRAME_X_DISPLAY_INFO (f)->root_window,
|
||||
FRAME_DISPLAY_INFO (f)->root_window,
|
||||
/* x, y, width, height */
|
||||
0, 0, 1, 1,
|
||||
/* Border. */
|
||||
|
@ -4986,7 +4986,7 @@ x_create_tip_frame (struct x_display_info *dpyinfo,
|
|||
CopyFromParent, InputOutput, CopyFromParent,
|
||||
mask, &attrs);
|
||||
XChangeProperty (FRAME_X_DISPLAY (f), tip_window,
|
||||
FRAME_X_DISPLAY_INFO (f)->Xatom_net_window_type,
|
||||
FRAME_DISPLAY_INFO (f)->Xatom_net_window_type,
|
||||
XA_ATOM, 32, PropModeReplace,
|
||||
(unsigned char *)&type, 1);
|
||||
unblock_input ();
|
||||
|
@ -5021,10 +5021,10 @@ x_create_tip_frame (struct x_display_info *dpyinfo,
|
|||
{
|
||||
Lisp_Object disptype;
|
||||
|
||||
if (FRAME_X_DISPLAY_INFO (f)->n_planes == 1)
|
||||
if (FRAME_DISPLAY_INFO (f)->n_planes == 1)
|
||||
disptype = intern ("mono");
|
||||
else if (FRAME_X_DISPLAY_INFO (f)->visual->class == GrayScale
|
||||
|| FRAME_X_DISPLAY_INFO (f)->visual->class == StaticGray)
|
||||
else if (FRAME_DISPLAY_INFO (f)->visual->class == GrayScale
|
||||
|| FRAME_DISPLAY_INFO (f)->visual->class == StaticGray)
|
||||
disptype = intern ("grayscale");
|
||||
else
|
||||
disptype = intern ("color");
|
||||
|
@ -5058,7 +5058,7 @@ x_create_tip_frame (struct x_display_info *dpyinfo,
|
|||
|
||||
/* Now that the frame will be official, it counts as a reference to
|
||||
its display and terminal. */
|
||||
FRAME_X_DISPLAY_INFO (f)->reference_count++;
|
||||
FRAME_DISPLAY_INFO (f)->reference_count++;
|
||||
f->terminal->reference_count++;
|
||||
|
||||
/* It is now ok to make the frame official even if we get an error
|
||||
|
@ -5102,7 +5102,7 @@ compute_tip_xy (struct frame *f, Lisp_Object parms, Lisp_Object dx, Lisp_Object
|
|||
if (!INTEGERP (left) || !INTEGERP (top))
|
||||
{
|
||||
block_input ();
|
||||
XQueryPointer (FRAME_X_DISPLAY (f), FRAME_X_DISPLAY_INFO (f)->root_window,
|
||||
XQueryPointer (FRAME_X_DISPLAY (f), FRAME_DISPLAY_INFO (f)->root_window,
|
||||
&root, &child, root_x, root_y, &win_x, &win_y, &pmask);
|
||||
unblock_input ();
|
||||
}
|
||||
|
@ -5112,7 +5112,7 @@ compute_tip_xy (struct frame *f, Lisp_Object parms, Lisp_Object dx, Lisp_Object
|
|||
else if (*root_y + XINT (dy) <= 0)
|
||||
*root_y = 0; /* Can happen for negative dy */
|
||||
else if (*root_y + XINT (dy) + height
|
||||
<= x_display_pixel_height (FRAME_X_DISPLAY_INFO (f)))
|
||||
<= x_display_pixel_height (FRAME_DISPLAY_INFO (f)))
|
||||
/* It fits below the pointer */
|
||||
*root_y += XINT (dy);
|
||||
else if (height + XINT (dy) <= *root_y)
|
||||
|
@ -5127,7 +5127,7 @@ compute_tip_xy (struct frame *f, Lisp_Object parms, Lisp_Object dx, Lisp_Object
|
|||
else if (*root_x + XINT (dx) <= 0)
|
||||
*root_x = 0; /* Can happen for negative dx */
|
||||
else if (*root_x + XINT (dx) + width
|
||||
<= x_display_pixel_width (FRAME_X_DISPLAY_INFO (f)))
|
||||
<= x_display_pixel_width (FRAME_DISPLAY_INFO (f)))
|
||||
/* It fits to the right of the pointer. */
|
||||
*root_x += XINT (dx);
|
||||
else if (width + XINT (dx) <= *root_x)
|
||||
|
@ -5276,7 +5276,7 @@ Text larger than the specified size is clipped. */)
|
|||
|
||||
/* Create a frame for the tooltip, and record it in the global
|
||||
variable tip_frame. */
|
||||
frame = x_create_tip_frame (FRAME_X_DISPLAY_INFO (f), parms, string);
|
||||
frame = x_create_tip_frame (FRAME_DISPLAY_INFO (f), parms, string);
|
||||
f = XFRAME (frame);
|
||||
|
||||
/* Set up the frame's root window. */
|
||||
|
@ -5476,7 +5476,7 @@ Value is t if tooltip was open, nil otherwise. */)
|
|||
struct frame *f = SELECTED_FRAME ();
|
||||
w = f->output_data.x->menubar_widget;
|
||||
|
||||
if (!DoesSaveUnders (FRAME_X_DISPLAY_INFO (f)->screen)
|
||||
if (!DoesSaveUnders (FRAME_DISPLAY_INFO (f)->screen)
|
||||
&& w != NULL)
|
||||
{
|
||||
block_input ();
|
||||
|
|
10
src/xfont.c
10
src/xfont.c
|
@ -154,7 +154,7 @@ struct font_driver xfont_driver =
|
|||
static Lisp_Object
|
||||
xfont_get_cache (struct frame *f)
|
||||
{
|
||||
Display_Info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
|
||||
Display_Info *dpyinfo = FRAME_DISPLAY_INFO (f);
|
||||
|
||||
return (dpyinfo->name_list_element);
|
||||
}
|
||||
|
@ -488,7 +488,7 @@ xfont_list_pattern (Display *display, const char *pattern,
|
|||
static Lisp_Object
|
||||
xfont_list (struct frame *f, Lisp_Object spec)
|
||||
{
|
||||
Display *display = FRAME_X_DISPLAY_INFO (f)->display;
|
||||
Display *display = FRAME_DISPLAY_INFO (f)->display;
|
||||
Lisp_Object registry, list, val, extra, script;
|
||||
int len;
|
||||
/* Large enough to contain the longest XLFD (255 bytes) in UTF-8. */
|
||||
|
@ -566,7 +566,7 @@ xfont_list (struct frame *f, Lisp_Object spec)
|
|||
static Lisp_Object
|
||||
xfont_match (struct frame *f, Lisp_Object spec)
|
||||
{
|
||||
Display *display = FRAME_X_DISPLAY_INFO (f)->display;
|
||||
Display *display = FRAME_DISPLAY_INFO (f)->display;
|
||||
Lisp_Object extra, val, entity;
|
||||
char name[512];
|
||||
XFontStruct *xfont;
|
||||
|
@ -620,7 +620,7 @@ xfont_match (struct frame *f, Lisp_Object spec)
|
|||
static Lisp_Object
|
||||
xfont_list_family (struct frame *f)
|
||||
{
|
||||
Display_Info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
|
||||
Display_Info *dpyinfo = FRAME_DISPLAY_INFO (f);
|
||||
char **names;
|
||||
int num_fonts, i;
|
||||
Lisp_Object list;
|
||||
|
@ -676,7 +676,7 @@ xfont_list_family (struct frame *f)
|
|||
static Lisp_Object
|
||||
xfont_open (struct frame *f, Lisp_Object entity, int pixel_size)
|
||||
{
|
||||
Display_Info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
|
||||
Display_Info *dpyinfo = FRAME_DISPLAY_INFO (f);
|
||||
Display *display = dpyinfo->display;
|
||||
char name[512];
|
||||
int len;
|
||||
|
|
20
src/xmenu.c
20
src/xmenu.c
|
@ -498,7 +498,7 @@ If FRAME is nil or not given, use the selected frame. */)
|
|||
memset (&ev, 0, sizeof ev);
|
||||
ev.xbutton.display = FRAME_X_DISPLAY (f);
|
||||
ev.xbutton.window = XtWindow (menubar);
|
||||
ev.xbutton.root = FRAME_X_DISPLAY_INFO (f)->root_window;
|
||||
ev.xbutton.root = FRAME_DISPLAY_INFO (f)->root_window;
|
||||
ev.xbutton.time = XtLastTimestampProcessed (FRAME_X_DISPLAY (f));
|
||||
ev.xbutton.button = Button1;
|
||||
ev.xbutton.x = ev.xbutton.y = FRAME_MENUBAR_HEIGHT (f) / 2;
|
||||
|
@ -1367,7 +1367,7 @@ menu_position_func (GtkMenu *menu, gint *x, gint *y, gboolean *push_in, gpointer
|
|||
{
|
||||
struct next_popup_x_y *data = user_data;
|
||||
GtkRequisition req;
|
||||
struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (data->f);
|
||||
struct x_display_info *dpyinfo = FRAME_DISPLAY_INFO (data->f);
|
||||
int disp_width = x_display_pixel_width (dpyinfo);
|
||||
int disp_height = x_display_pixel_height (dpyinfo);
|
||||
|
||||
|
@ -1449,7 +1449,7 @@ create_and_show_popup_menu (struct frame *f, widget_value *first_wv, int x, int
|
|||
if (for_click)
|
||||
{
|
||||
for (i = 0; i < 5; i++)
|
||||
if (FRAME_X_DISPLAY_INFO (f)->grabbed & (1 << i))
|
||||
if (FRAME_DISPLAY_INFO (f)->grabbed & (1 << i))
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -1474,7 +1474,7 @@ create_and_show_popup_menu (struct frame *f, widget_value *first_wv, int x, int
|
|||
|
||||
/* Must reset this manually because the button release event is not passed
|
||||
to Emacs event loop. */
|
||||
FRAME_X_DISPLAY_INFO (f)->grabbed = 0;
|
||||
FRAME_DISPLAY_INFO (f)->grabbed = 0;
|
||||
}
|
||||
|
||||
#else /* not USE_GTK */
|
||||
|
@ -1543,7 +1543,7 @@ create_and_show_popup_menu (struct frame *f, widget_value *first_wv,
|
|||
event->send_event = 0;
|
||||
event->display = FRAME_X_DISPLAY (f);
|
||||
event->time = CurrentTime;
|
||||
event->root = FRAME_X_DISPLAY_INFO (f)->root_window;
|
||||
event->root = FRAME_DISPLAY_INFO (f)->root_window;
|
||||
event->window = event->subwindow = event->root;
|
||||
event->x = x;
|
||||
event->y = y;
|
||||
|
@ -1558,7 +1558,7 @@ create_and_show_popup_menu (struct frame *f, widget_value *first_wv,
|
|||
event->state = 0;
|
||||
event->button = 0;
|
||||
for (i = 0; i < 5; i++)
|
||||
if (FRAME_X_DISPLAY_INFO (f)->grabbed & (1 << i))
|
||||
if (FRAME_DISPLAY_INFO (f)->grabbed & (1 << i))
|
||||
event->button = i;
|
||||
|
||||
/* Don't allow any geometry request from the user. */
|
||||
|
@ -1578,7 +1578,7 @@ create_and_show_popup_menu (struct frame *f, widget_value *first_wv,
|
|||
make_number (menu_id & ~(-1 << (fact)))));
|
||||
|
||||
/* Process events that apply to the menu. */
|
||||
popup_get_selection (0, FRAME_X_DISPLAY_INFO (f), menu_id, 1);
|
||||
popup_get_selection (0, FRAME_DISPLAY_INFO (f), menu_id, 1);
|
||||
|
||||
unbind_to (specpdl_count, Qnil);
|
||||
}
|
||||
|
@ -1962,7 +1962,7 @@ create_and_show_dialog (struct frame *f, widget_value *first_wv)
|
|||
Fcons (make_number (dialog_id >> (fact)),
|
||||
make_number (dialog_id & ~(-1 << (fact)))));
|
||||
|
||||
popup_get_selection (0, FRAME_X_DISPLAY_INFO (f), dialog_id, 1);
|
||||
popup_get_selection (0, FRAME_DISPLAY_INFO (f), dialog_id, 1);
|
||||
|
||||
unbind_to (count, Qnil);
|
||||
}
|
||||
|
@ -2218,13 +2218,13 @@ pop_down_menu (Lisp_Object arg)
|
|||
#ifdef HAVE_X_WINDOWS
|
||||
/* Assume the mouse has moved out of the X window.
|
||||
If it has actually moved in, we will get an EnterNotify. */
|
||||
x_mouse_leave (FRAME_X_DISPLAY_INFO (f));
|
||||
x_mouse_leave (FRAME_DISPLAY_INFO (f));
|
||||
|
||||
/* State that no mouse buttons are now held.
|
||||
(The oldXMenu code doesn't track this info for us.)
|
||||
That is not necessarily true, but the fiction leads to reasonable
|
||||
results, and it is a pain to ask which are actually held now. */
|
||||
FRAME_X_DISPLAY_INFO (f)->grabbed = 0;
|
||||
FRAME_DISPLAY_INFO (f)->grabbed = 0;
|
||||
|
||||
#endif /* HAVE_X_WINDOWS */
|
||||
|
||||
|
|
|
@ -318,7 +318,7 @@ x_own_selection (Lisp_Object selection_name, Lisp_Object selection_value,
|
|||
{
|
||||
struct frame *f = XFRAME (frame);
|
||||
Window selecting_window = FRAME_X_WINDOW (f);
|
||||
struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
|
||||
struct x_display_info *dpyinfo = FRAME_DISPLAY_INFO (f);
|
||||
Display *display = dpyinfo->display;
|
||||
Time timestamp = last_event_timestamp;
|
||||
Atom selection_atom = symbol_to_x_atom (dpyinfo, selection_name);
|
||||
|
@ -997,7 +997,7 @@ x_clear_frame_selections (struct frame *f)
|
|||
{
|
||||
Lisp_Object frame;
|
||||
Lisp_Object rest;
|
||||
struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
|
||||
struct x_display_info *dpyinfo = FRAME_DISPLAY_INFO (f);
|
||||
struct terminal *t = dpyinfo->terminal;
|
||||
|
||||
XSETFRAME (frame, f);
|
||||
|
@ -1185,7 +1185,7 @@ x_get_foreign_selection (Lisp_Object selection_symbol, Lisp_Object target_type,
|
|||
Lisp_Object time_stamp, Lisp_Object frame)
|
||||
{
|
||||
struct frame *f = XFRAME (frame);
|
||||
struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
|
||||
struct x_display_info *dpyinfo = FRAME_DISPLAY_INFO (f);
|
||||
Display *display = dpyinfo->display;
|
||||
Window requestor_window = FRAME_X_WINDOW (f);
|
||||
Time requestor_time = last_event_timestamp;
|
||||
|
@ -2009,7 +2009,7 @@ On Nextstep, TIME-STAMP and TERMINAL are unused. */)
|
|||
error ("X selection unavailable for this frame");
|
||||
|
||||
val = x_get_local_selection (selection_symbol, target_type, 1,
|
||||
FRAME_X_DISPLAY_INFO (f));
|
||||
FRAME_DISPLAY_INFO (f));
|
||||
|
||||
if (NILP (val) && FRAME_LIVE_P (f))
|
||||
{
|
||||
|
@ -2056,7 +2056,7 @@ On MS-DOS, all this does is return non-nil if we own the selection. */)
|
|||
if (!f)
|
||||
return Qnil;
|
||||
|
||||
dpyinfo = FRAME_X_DISPLAY_INFO (f);
|
||||
dpyinfo = FRAME_DISPLAY_INFO (f);
|
||||
CHECK_SYMBOL (selection);
|
||||
|
||||
/* Don't disown the selection when we're not the owner. */
|
||||
|
@ -2108,7 +2108,7 @@ On Nextstep, TERMINAL is unused. */)
|
|||
if (EQ (selection, Qnil)) selection = QPRIMARY;
|
||||
if (EQ (selection, Qt)) selection = QSECONDARY;
|
||||
|
||||
if (f && !NILP (LOCAL_SELECTION (selection, FRAME_X_DISPLAY_INFO (f))))
|
||||
if (f && !NILP (LOCAL_SELECTION (selection, FRAME_DISPLAY_INFO (f))))
|
||||
return Qt;
|
||||
else
|
||||
return Qnil;
|
||||
|
@ -2141,7 +2141,7 @@ On Nextstep, TERMINAL is unused. */)
|
|||
if (!f)
|
||||
return Qnil;
|
||||
|
||||
dpyinfo = FRAME_X_DISPLAY_INFO (f);
|
||||
dpyinfo = FRAME_DISPLAY_INFO (f);
|
||||
|
||||
if (!NILP (LOCAL_SELECTION (selection, dpyinfo)))
|
||||
return Qt;
|
||||
|
@ -2162,7 +2162,7 @@ static Lisp_Object
|
|||
x_clipboard_manager_save (Lisp_Object frame)
|
||||
{
|
||||
struct frame *f = XFRAME (frame);
|
||||
struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
|
||||
struct x_display_info *dpyinfo = FRAME_DISPLAY_INFO (f);
|
||||
Atom data = dpyinfo->Xatom_UTF8_STRING;
|
||||
|
||||
XChangeProperty (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
|
||||
|
@ -2212,7 +2212,7 @@ x_clipboard_manager_save_frame (Lisp_Object frame)
|
|||
&& (f = XFRAME (frame), FRAME_X_P (f))
|
||||
&& FRAME_LIVE_P (f))
|
||||
{
|
||||
struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
|
||||
struct x_display_info *dpyinfo = FRAME_DISPLAY_INFO (f);
|
||||
Lisp_Object local_selection
|
||||
= LOCAL_SELECTION (QCLIPBOARD, dpyinfo);
|
||||
|
||||
|
@ -2458,7 +2458,7 @@ FRAME is on. If FRAME is nil, the selected frame is used. */)
|
|||
Atom x_atom;
|
||||
struct frame *f = decode_window_system_frame (frame);
|
||||
ptrdiff_t i;
|
||||
struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
|
||||
struct x_display_info *dpyinfo = FRAME_DISPLAY_INFO (f);
|
||||
|
||||
|
||||
if (SYMBOLP (atom))
|
||||
|
|
150
src/xterm.c
150
src/xterm.c
|
@ -412,7 +412,7 @@ x_find_topmost_parent (struct frame *f)
|
|||
Window win = None, wi = x->parent_desc;
|
||||
Display *dpy = FRAME_X_DISPLAY (f);
|
||||
|
||||
while (wi != FRAME_X_DISPLAY_INFO (f)->root_window)
|
||||
while (wi != FRAME_DISPLAY_INFO (f)->root_window)
|
||||
{
|
||||
Window root;
|
||||
Window *children;
|
||||
|
@ -431,7 +431,7 @@ x_find_topmost_parent (struct frame *f)
|
|||
void
|
||||
x_set_frame_alpha (struct frame *f)
|
||||
{
|
||||
struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
|
||||
struct x_display_info *dpyinfo = FRAME_DISPLAY_INFO (f);
|
||||
Display *dpy = FRAME_X_DISPLAY (f);
|
||||
Window win = FRAME_OUTER_WINDOW (f);
|
||||
double alpha = 1.0;
|
||||
|
@ -788,7 +788,7 @@ x_draw_fringe_bitmap (struct window *w, struct glyph_row *row, struct draw_fring
|
|||
if (p->overlay_p)
|
||||
{
|
||||
clipmask = XCreatePixmapFromBitmapData (display,
|
||||
FRAME_X_DISPLAY_INFO (f)->root_window,
|
||||
FRAME_DISPLAY_INFO (f)->root_window,
|
||||
bits, p->wd, p->h,
|
||||
1, 0, 1);
|
||||
gcv.clip_mask = clipmask;
|
||||
|
@ -892,14 +892,14 @@ x_set_cursor_gc (struct glyph_string *s)
|
|||
xgcv.graphics_exposures = False;
|
||||
mask = GCForeground | GCBackground | GCGraphicsExposures;
|
||||
|
||||
if (FRAME_X_DISPLAY_INFO (s->f)->scratch_cursor_gc)
|
||||
XChangeGC (s->display, FRAME_X_DISPLAY_INFO (s->f)->scratch_cursor_gc,
|
||||
if (FRAME_DISPLAY_INFO (s->f)->scratch_cursor_gc)
|
||||
XChangeGC (s->display, FRAME_DISPLAY_INFO (s->f)->scratch_cursor_gc,
|
||||
mask, &xgcv);
|
||||
else
|
||||
FRAME_X_DISPLAY_INFO (s->f)->scratch_cursor_gc
|
||||
FRAME_DISPLAY_INFO (s->f)->scratch_cursor_gc
|
||||
= XCreateGC (s->display, s->window, mask, &xgcv);
|
||||
|
||||
s->gc = FRAME_X_DISPLAY_INFO (s->f)->scratch_cursor_gc;
|
||||
s->gc = FRAME_DISPLAY_INFO (s->f)->scratch_cursor_gc;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -939,14 +939,14 @@ x_set_mouse_face_gc (struct glyph_string *s)
|
|||
xgcv.graphics_exposures = False;
|
||||
mask = GCForeground | GCBackground | GCGraphicsExposures;
|
||||
|
||||
if (FRAME_X_DISPLAY_INFO (s->f)->scratch_cursor_gc)
|
||||
XChangeGC (s->display, FRAME_X_DISPLAY_INFO (s->f)->scratch_cursor_gc,
|
||||
if (FRAME_DISPLAY_INFO (s->f)->scratch_cursor_gc)
|
||||
XChangeGC (s->display, FRAME_DISPLAY_INFO (s->f)->scratch_cursor_gc,
|
||||
mask, &xgcv);
|
||||
else
|
||||
FRAME_X_DISPLAY_INFO (s->f)->scratch_cursor_gc
|
||||
FRAME_DISPLAY_INFO (s->f)->scratch_cursor_gc
|
||||
= XCreateGC (s->display, s->window, mask, &xgcv);
|
||||
|
||||
s->gc = FRAME_X_DISPLAY_INFO (s->f)->scratch_cursor_gc;
|
||||
s->gc = FRAME_DISPLAY_INFO (s->f)->scratch_cursor_gc;
|
||||
|
||||
}
|
||||
eassert (s->gc != 0);
|
||||
|
@ -1382,7 +1382,7 @@ x_frame_of_widget (Widget widget)
|
|||
f = XFRAME (frame);
|
||||
if (FRAME_X_P (f)
|
||||
&& f->output_data.nothing != 1
|
||||
&& FRAME_X_DISPLAY_INFO (f) == dpyinfo
|
||||
&& FRAME_DISPLAY_INFO (f) == dpyinfo
|
||||
&& f->output_data.x->widget == widget)
|
||||
return f;
|
||||
}
|
||||
|
@ -1591,7 +1591,7 @@ x_color_cells (Display *dpy, int *ncells)
|
|||
void
|
||||
x_query_colors (struct frame *f, XColor *colors, int ncolors)
|
||||
{
|
||||
struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
|
||||
struct x_display_info *dpyinfo = FRAME_DISPLAY_INFO (f);
|
||||
|
||||
if (dpyinfo->color_cells)
|
||||
{
|
||||
|
@ -1831,7 +1831,7 @@ x_setup_relief_color (struct frame *f, struct relief *relief, double factor, int
|
|||
unsigned long pixel;
|
||||
unsigned long background = di->relief_background;
|
||||
Colormap cmap = FRAME_X_COLORMAP (f);
|
||||
struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
|
||||
struct x_display_info *dpyinfo = FRAME_DISPLAY_INFO (f);
|
||||
Display *dpy = FRAME_X_DISPLAY (f);
|
||||
|
||||
xgcv.graphics_exposures = False;
|
||||
|
@ -3132,9 +3132,9 @@ XTtoggle_invisible_pointer (struct frame *f, int invisible)
|
|||
block_input ();
|
||||
if (invisible)
|
||||
{
|
||||
if (FRAME_X_DISPLAY_INFO (f)->invisible_cursor != 0)
|
||||
if (FRAME_DISPLAY_INFO (f)->invisible_cursor != 0)
|
||||
XDefineCursor (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
|
||||
FRAME_X_DISPLAY_INFO (f)->invisible_cursor);
|
||||
FRAME_DISPLAY_INFO (f)->invisible_cursor);
|
||||
}
|
||||
else
|
||||
XDefineCursor (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
|
||||
|
@ -3404,7 +3404,7 @@ x_window_to_frame (struct x_display_info *dpyinfo, int wdesc)
|
|||
FOR_EACH_FRAME (tail, frame)
|
||||
{
|
||||
f = XFRAME (frame);
|
||||
if (!FRAME_X_P (f) || FRAME_X_DISPLAY_INFO (f) != dpyinfo)
|
||||
if (!FRAME_X_P (f) || FRAME_DISPLAY_INFO (f) != dpyinfo)
|
||||
continue;
|
||||
if (f->output_data.x->hourglass_window == wdesc)
|
||||
return f;
|
||||
|
@ -3454,7 +3454,7 @@ x_any_window_to_frame (struct x_display_info *dpyinfo, int wdesc)
|
|||
if (found)
|
||||
break;
|
||||
f = XFRAME (frame);
|
||||
if (FRAME_X_P (f) && FRAME_X_DISPLAY_INFO (f) == dpyinfo)
|
||||
if (FRAME_X_P (f) && FRAME_DISPLAY_INFO (f) == dpyinfo)
|
||||
{
|
||||
/* This frame matches if the window is any of its widgets. */
|
||||
x = f->output_data.x;
|
||||
|
@ -3502,7 +3502,7 @@ x_menubar_window_to_frame (struct x_display_info *dpyinfo, XEvent *event)
|
|||
FOR_EACH_FRAME (tail, frame)
|
||||
{
|
||||
f = XFRAME (frame);
|
||||
if (!FRAME_X_P (f) || FRAME_X_DISPLAY_INFO (f) != dpyinfo)
|
||||
if (!FRAME_X_P (f) || FRAME_DISPLAY_INFO (f) != dpyinfo)
|
||||
continue;
|
||||
x = f->output_data.x;
|
||||
#ifdef USE_GTK
|
||||
|
@ -3534,7 +3534,7 @@ x_top_window_to_frame (struct x_display_info *dpyinfo, int wdesc)
|
|||
FOR_EACH_FRAME (tail, frame)
|
||||
{
|
||||
f = XFRAME (frame);
|
||||
if (!FRAME_X_P (f) || FRAME_X_DISPLAY_INFO (f) != dpyinfo)
|
||||
if (!FRAME_X_P (f) || FRAME_DISPLAY_INFO (f) != dpyinfo)
|
||||
continue;
|
||||
x = f->output_data.x;
|
||||
|
||||
|
@ -3637,7 +3637,7 @@ x_mouse_leave (struct x_display_info *dpyinfo)
|
|||
static void
|
||||
XTframe_rehighlight (struct frame *frame)
|
||||
{
|
||||
x_frame_rehighlight (FRAME_X_DISPLAY_INFO (frame));
|
||||
x_frame_rehighlight (FRAME_DISPLAY_INFO (frame));
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -3870,7 +3870,7 @@ construct_mouse_click (struct input_event *result, XButtonEvent *event, struct f
|
|||
result->kind = MOUSE_CLICK_EVENT;
|
||||
result->code = event->button - Button1;
|
||||
result->timestamp = event->time;
|
||||
result->modifiers = (x_x_to_emacs_modifiers (FRAME_X_DISPLAY_INFO (f),
|
||||
result->modifiers = (x_x_to_emacs_modifiers (FRAME_DISPLAY_INFO (f),
|
||||
event->state)
|
||||
| (event->type == ButtonRelease
|
||||
? up_modifier
|
||||
|
@ -4035,7 +4035,7 @@ XTmouse_position (struct frame **fp, int insist, Lisp_Object *bar_window,
|
|||
|
||||
x_catch_errors (FRAME_X_DISPLAY (*fp));
|
||||
|
||||
if (FRAME_X_DISPLAY_INFO (*fp)->grabbed && last_mouse_frame
|
||||
if (FRAME_DISPLAY_INFO (*fp)->grabbed && last_mouse_frame
|
||||
&& FRAME_LIVE_P (last_mouse_frame))
|
||||
{
|
||||
/* If mouse was grabbed on a frame, give coords for that frame
|
||||
|
@ -4074,7 +4074,7 @@ XTmouse_position (struct frame **fp, int insist, Lisp_Object *bar_window,
|
|||
want the edit window. For non-Gtk+ the innermost
|
||||
window is the edit window. For Gtk+ it might not
|
||||
be. It might be the tool bar for example. */
|
||||
if (x_window_to_frame (FRAME_X_DISPLAY_INFO (*fp), win))
|
||||
if (x_window_to_frame (FRAME_DISPLAY_INFO (*fp), win))
|
||||
break;
|
||||
#endif
|
||||
win = child;
|
||||
|
@ -4096,10 +4096,10 @@ XTmouse_position (struct frame **fp, int insist, Lisp_Object *bar_window,
|
|||
#ifdef USE_GTK
|
||||
/* We don't wan't to know the innermost window. We
|
||||
want the edit window. */
|
||||
f1 = x_window_to_frame (FRAME_X_DISPLAY_INFO (*fp), win);
|
||||
f1 = x_window_to_frame (FRAME_DISPLAY_INFO (*fp), win);
|
||||
#else
|
||||
/* Is win one of our frames? */
|
||||
f1 = x_any_window_to_frame (FRAME_X_DISPLAY_INFO (*fp), win);
|
||||
f1 = x_any_window_to_frame (FRAME_DISPLAY_INFO (*fp), win);
|
||||
#endif
|
||||
|
||||
#ifdef USE_X_TOOLKIT
|
||||
|
@ -4341,7 +4341,7 @@ x_send_scroll_bar_event (Lisp_Object window, int part, int portion, int whole)
|
|||
|
||||
/* Construct a ClientMessage event to send to the frame. */
|
||||
ev->type = ClientMessage;
|
||||
ev->message_type = FRAME_X_DISPLAY_INFO (f)->Xatom_Scrollbar;
|
||||
ev->message_type = FRAME_DISPLAY_INFO (f)->Xatom_Scrollbar;
|
||||
ev->display = FRAME_X_DISPLAY (f);
|
||||
ev->window = FRAME_X_WINDOW (f);
|
||||
ev->format = 32;
|
||||
|
@ -4522,8 +4522,8 @@ xg_scroll_callback (GtkRange *range,
|
|||
{
|
||||
case GTK_SCROLL_JUMP:
|
||||
/* Buttons 1 2 or 3 must be grabbed. */
|
||||
if (FRAME_X_DISPLAY_INFO (f)->grabbed != 0
|
||||
&& FRAME_X_DISPLAY_INFO (f)->grabbed < (1 << 4))
|
||||
if (FRAME_DISPLAY_INFO (f)->grabbed != 0
|
||||
&& FRAME_DISPLAY_INFO (f)->grabbed < (1 << 4))
|
||||
{
|
||||
part = scroll_bar_handle;
|
||||
whole = gtk_adjustment_get_upper (adj) -
|
||||
|
@ -5042,7 +5042,7 @@ x_scroll_bar_create (struct window *w, int top, int left, int width, int height)
|
|||
a.event_mask = (ButtonPressMask | ButtonReleaseMask
|
||||
| ButtonMotionMask | PointerMotionHintMask
|
||||
| ExposureMask);
|
||||
a.cursor = FRAME_X_DISPLAY_INFO (f)->vertical_scroll_bar_cursor;
|
||||
a.cursor = FRAME_DISPLAY_INFO (f)->vertical_scroll_bar_cursor;
|
||||
|
||||
mask = (CWBackPixel | CWEventMask | CWCursor);
|
||||
|
||||
|
@ -5615,7 +5615,7 @@ x_scroll_bar_handle_click (struct scroll_bar *bar, XEvent *event, struct input_e
|
|||
emacs_event->kind = SCROLL_BAR_CLICK_EVENT;
|
||||
emacs_event->code = event->xbutton.button - Button1;
|
||||
emacs_event->modifiers
|
||||
= (x_x_to_emacs_modifiers (FRAME_X_DISPLAY_INFO
|
||||
= (x_x_to_emacs_modifiers (FRAME_DISPLAY_INFO
|
||||
(XFRAME (WINDOW_FRAME (XWINDOW (bar->window)))),
|
||||
event->xbutton.state)
|
||||
| (event->type == ButtonRelease
|
||||
|
@ -6227,8 +6227,8 @@ handle_one_xevent (struct x_display_info *dpyinfo, XEvent *eventptr,
|
|||
f->top_pos = y;
|
||||
|
||||
/* Perhaps reparented due to a WM restart. Reset this. */
|
||||
FRAME_X_DISPLAY_INFO (f)->wm_type = X_WMTYPE_UNKNOWN;
|
||||
FRAME_X_DISPLAY_INFO (f)->net_supported_window = 0;
|
||||
FRAME_DISPLAY_INFO (f)->wm_type = X_WMTYPE_UNKNOWN;
|
||||
FRAME_DISPLAY_INFO (f)->net_supported_window = 0;
|
||||
|
||||
x_set_frame_alpha (f);
|
||||
}
|
||||
|
@ -6462,7 +6462,7 @@ handle_one_xevent (struct x_display_info *dpyinfo, XEvent *eventptr,
|
|||
#endif
|
||||
|
||||
event.xkey.state
|
||||
|= x_emacs_to_x_modifiers (FRAME_X_DISPLAY_INFO (f),
|
||||
|= x_emacs_to_x_modifiers (FRAME_DISPLAY_INFO (f),
|
||||
extra_keyboard_modifiers);
|
||||
modifiers = event.xkey.state;
|
||||
|
||||
|
@ -6536,7 +6536,7 @@ handle_one_xevent (struct x_display_info *dpyinfo, XEvent *eventptr,
|
|||
/* Common for all keysym input events. */
|
||||
XSETFRAME (inev.ie.frame_or_window, f);
|
||||
inev.ie.modifiers
|
||||
= x_x_to_emacs_modifiers (FRAME_X_DISPLAY_INFO (f), modifiers);
|
||||
= x_x_to_emacs_modifiers (FRAME_DISPLAY_INFO (f), modifiers);
|
||||
inev.ie.timestamp = event.xkey.time;
|
||||
|
||||
/* First deal with keysyms which have defined
|
||||
|
@ -7312,7 +7312,7 @@ static void
|
|||
x_draw_hollow_cursor (struct window *w, struct glyph_row *row)
|
||||
{
|
||||
struct frame *f = XFRAME (WINDOW_FRAME (w));
|
||||
struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
|
||||
struct x_display_info *dpyinfo = FRAME_DISPLAY_INFO (f);
|
||||
Display *dpy = FRAME_X_DISPLAY (f);
|
||||
int x, y, wd, h;
|
||||
XGCValues xgcv;
|
||||
|
@ -7379,7 +7379,7 @@ x_draw_bar_cursor (struct window *w, struct glyph_row *row, int width, enum text
|
|||
{
|
||||
Display *dpy = FRAME_X_DISPLAY (f);
|
||||
Window window = FRAME_X_WINDOW (f);
|
||||
GC gc = FRAME_X_DISPLAY_INFO (f)->scratch_cursor_gc;
|
||||
GC gc = FRAME_DISPLAY_INFO (f)->scratch_cursor_gc;
|
||||
unsigned long mask = GCForeground | GCBackground | GCGraphicsExposures;
|
||||
struct face *face = FACE_FROM_ID (f, cursor_glyph->face_id);
|
||||
XGCValues xgcv;
|
||||
|
@ -7400,7 +7400,7 @@ x_draw_bar_cursor (struct window *w, struct glyph_row *row, int width, enum text
|
|||
else
|
||||
{
|
||||
gc = XCreateGC (dpy, window, mask, &xgcv);
|
||||
FRAME_X_DISPLAY_INFO (f)->scratch_cursor_gc = gc;
|
||||
FRAME_DISPLAY_INFO (f)->scratch_cursor_gc = gc;
|
||||
}
|
||||
|
||||
x_clip_to_row (w, row, TEXT_AREA, gc);
|
||||
|
@ -7567,7 +7567,7 @@ x_bitmap_icon (struct frame *f, Lisp_Object file)
|
|||
else
|
||||
{
|
||||
/* Create the GNU bitmap and mask if necessary. */
|
||||
if (FRAME_X_DISPLAY_INFO (f)->icon_bitmap_id < 0)
|
||||
if (FRAME_DISPLAY_INFO (f)->icon_bitmap_id < 0)
|
||||
{
|
||||
ptrdiff_t rc = -1;
|
||||
|
||||
|
@ -7581,7 +7581,7 @@ x_bitmap_icon (struct frame *f, Lisp_Object file)
|
|||
|
||||
rc = x_create_bitmap_from_xpm_data (f, gnu_xpm_bits);
|
||||
if (rc != -1)
|
||||
FRAME_X_DISPLAY_INFO (f)->icon_bitmap_id = rc;
|
||||
FRAME_DISPLAY_INFO (f)->icon_bitmap_id = rc;
|
||||
|
||||
#endif
|
||||
|
||||
|
@ -7593,8 +7593,8 @@ x_bitmap_icon (struct frame *f, Lisp_Object file)
|
|||
if (rc == -1)
|
||||
return 1;
|
||||
|
||||
FRAME_X_DISPLAY_INFO (f)->icon_bitmap_id = rc;
|
||||
x_create_bitmap_mask (f, FRAME_X_DISPLAY_INFO (f)->icon_bitmap_id);
|
||||
FRAME_DISPLAY_INFO (f)->icon_bitmap_id = rc;
|
||||
x_create_bitmap_mask (f, FRAME_DISPLAY_INFO (f)->icon_bitmap_id);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -7602,9 +7602,9 @@ x_bitmap_icon (struct frame *f, Lisp_Object file)
|
|||
this increments the ref-count one extra time.
|
||||
As a result, the GNU bitmap and mask are never freed.
|
||||
That way, we don't have to worry about allocating it again. */
|
||||
x_reference_bitmap (f, FRAME_X_DISPLAY_INFO (f)->icon_bitmap_id);
|
||||
x_reference_bitmap (f, FRAME_DISPLAY_INFO (f)->icon_bitmap_id);
|
||||
|
||||
bitmap_id = FRAME_X_DISPLAY_INFO (f)->icon_bitmap_id;
|
||||
bitmap_id = FRAME_DISPLAY_INFO (f)->icon_bitmap_id;
|
||||
}
|
||||
|
||||
x_wm_set_icon_pixmap (f, bitmap_id);
|
||||
|
@ -7818,7 +7818,7 @@ x_connection_closed (Display *dpy, const char *error_message)
|
|||
if (FRAME_X_P (XFRAME (frame))
|
||||
&& FRAME_X_P (XFRAME (minibuf_frame))
|
||||
&& ! EQ (frame, minibuf_frame)
|
||||
&& FRAME_X_DISPLAY_INFO (XFRAME (minibuf_frame)) == dpyinfo)
|
||||
&& FRAME_DISPLAY_INFO (XFRAME (minibuf_frame)) == dpyinfo)
|
||||
delete_frame (frame, Qnoelisp);
|
||||
}
|
||||
|
||||
|
@ -7827,7 +7827,7 @@ x_connection_closed (Display *dpy, const char *error_message)
|
|||
for another frame that we need to delete. */
|
||||
FOR_EACH_FRAME (tail, frame)
|
||||
if (FRAME_X_P (XFRAME (frame))
|
||||
&& FRAME_X_DISPLAY_INFO (XFRAME (frame)) == dpyinfo)
|
||||
&& FRAME_DISPLAY_INFO (XFRAME (frame)) == dpyinfo)
|
||||
{
|
||||
/* Set this to t so that delete_frame won't get confused
|
||||
trying to find a replacement. */
|
||||
|
@ -8050,7 +8050,7 @@ xim_destroy_callback (XIM xim, XPointer client_data, XPointer call_data)
|
|||
FOR_EACH_FRAME (tail, frame)
|
||||
{
|
||||
struct frame *f = XFRAME (frame);
|
||||
if (FRAME_X_P (f) && FRAME_X_DISPLAY_INFO (f) == dpyinfo)
|
||||
if (FRAME_X_P (f) && FRAME_DISPLAY_INFO (f) == dpyinfo)
|
||||
{
|
||||
FRAME_XIC (f) = NULL;
|
||||
xic_free_xfontset (f);
|
||||
|
@ -8141,7 +8141,7 @@ xim_instantiate_callback (Display *display, XPointer client_data, XPointer call_
|
|||
struct frame *f = XFRAME (frame);
|
||||
|
||||
if (FRAME_X_P (f)
|
||||
&& FRAME_X_DISPLAY_INFO (f) == xim_inst->dpyinfo)
|
||||
&& FRAME_DISPLAY_INFO (f) == xim_inst->dpyinfo)
|
||||
if (FRAME_XIC (f) == NULL)
|
||||
{
|
||||
create_frame_xic (f);
|
||||
|
@ -8239,7 +8239,7 @@ x_calc_absolute_position (struct frame *f)
|
|||
/* Treat negative positions as relative to the leftmost bottommost
|
||||
position that fits on the screen. */
|
||||
if (flags & XNegative)
|
||||
f->left_pos = x_display_pixel_width (FRAME_X_DISPLAY_INFO (f))
|
||||
f->left_pos = x_display_pixel_width (FRAME_DISPLAY_INFO (f))
|
||||
- FRAME_PIXEL_WIDTH (f) + f->left_pos;
|
||||
|
||||
{
|
||||
|
@ -8262,7 +8262,7 @@ x_calc_absolute_position (struct frame *f)
|
|||
#endif
|
||||
|
||||
if (flags & YNegative)
|
||||
f->top_pos = x_display_pixel_height (FRAME_X_DISPLAY_INFO (f))
|
||||
f->top_pos = x_display_pixel_height (FRAME_DISPLAY_INFO (f))
|
||||
- height + f->top_pos;
|
||||
}
|
||||
|
||||
|
@ -8302,7 +8302,7 @@ x_set_offset (struct frame *f, register int xoff, register int yoff, int change_
|
|||
modified_left = f->left_pos;
|
||||
modified_top = f->top_pos;
|
||||
|
||||
if (change_gravity != 0 && FRAME_X_DISPLAY_INFO (f)->wm_type == X_WMTYPE_A)
|
||||
if (change_gravity != 0 && FRAME_DISPLAY_INFO (f)->wm_type == X_WMTYPE_A)
|
||||
{
|
||||
/* Some WMs (twm, wmaker at least) has an offset that is smaller
|
||||
than the WM decorations. So we use the calculated offset instead
|
||||
|
@ -8315,7 +8315,7 @@ x_set_offset (struct frame *f, register int xoff, register int yoff, int change_
|
|||
modified_left, modified_top);
|
||||
|
||||
x_sync_with_move (f, f->left_pos, f->top_pos,
|
||||
FRAME_X_DISPLAY_INFO (f)->wm_type == X_WMTYPE_UNKNOWN
|
||||
FRAME_DISPLAY_INFO (f)->wm_type == X_WMTYPE_UNKNOWN
|
||||
? 1 : 0);
|
||||
|
||||
/* change_gravity is non-zero when this function is called from Lisp to
|
||||
|
@ -8329,8 +8329,8 @@ x_set_offset (struct frame *f, register int xoff, register int yoff, int change_
|
|||
need to compute the top/left offset adjustment for this frame. */
|
||||
|
||||
if (change_gravity != 0 &&
|
||||
(FRAME_X_DISPLAY_INFO (f)->wm_type == X_WMTYPE_UNKNOWN
|
||||
|| (FRAME_X_DISPLAY_INFO (f)->wm_type == X_WMTYPE_A
|
||||
(FRAME_DISPLAY_INFO (f)->wm_type == X_WMTYPE_UNKNOWN
|
||||
|| (FRAME_DISPLAY_INFO (f)->wm_type == X_WMTYPE_A
|
||||
&& (FRAME_X_OUTPUT (f)->move_offset_left == 0
|
||||
&& FRAME_X_OUTPUT (f)->move_offset_top == 0))))
|
||||
x_check_expected_move (f, modified_left, modified_top);
|
||||
|
@ -8351,7 +8351,7 @@ wm_supports (struct frame *f, Atom want_atom)
|
|||
unsigned long actual_size, bytes_remaining;
|
||||
int i, rc, actual_format;
|
||||
Window wmcheck_window;
|
||||
struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
|
||||
struct x_display_info *dpyinfo = FRAME_DISPLAY_INFO (f);
|
||||
Window target_window = dpyinfo->root_window;
|
||||
long max_len = 65536;
|
||||
Display *dpy = FRAME_X_DISPLAY (f);
|
||||
|
@ -8432,7 +8432,7 @@ wm_supports (struct frame *f, Atom want_atom)
|
|||
static void
|
||||
set_wm_state (Lisp_Object frame, int add, Atom atom, Atom value)
|
||||
{
|
||||
struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (XFRAME (frame));
|
||||
struct x_display_info *dpyinfo = FRAME_DISPLAY_INFO (XFRAME (frame));
|
||||
|
||||
x_send_client_event (frame, make_number (0), frame,
|
||||
dpyinfo->Xatom_net_wm_state,
|
||||
|
@ -8451,7 +8451,7 @@ void
|
|||
x_set_sticky (struct frame *f, Lisp_Object new_value, Lisp_Object old_value)
|
||||
{
|
||||
Lisp_Object frame;
|
||||
struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
|
||||
struct x_display_info *dpyinfo = FRAME_DISPLAY_INFO (f);
|
||||
|
||||
XSETFRAME (frame, f);
|
||||
|
||||
|
@ -8474,7 +8474,7 @@ get_current_wm_state (struct frame *f,
|
|||
Atom actual_type;
|
||||
unsigned long actual_size, bytes_remaining;
|
||||
int i, rc, actual_format, is_hidden = 0;
|
||||
struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
|
||||
struct x_display_info *dpyinfo = FRAME_DISPLAY_INFO (f);
|
||||
long max_len = 65536;
|
||||
Display *dpy = FRAME_X_DISPLAY (f);
|
||||
unsigned char *tmp_data = NULL;
|
||||
|
@ -8538,7 +8538,7 @@ get_current_wm_state (struct frame *f,
|
|||
static int
|
||||
do_ewmh_fullscreen (struct frame *f)
|
||||
{
|
||||
struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
|
||||
struct x_display_info *dpyinfo = FRAME_DISPLAY_INFO (f);
|
||||
int have_net_atom = wm_supports (f, dpyinfo->Xatom_net_wm_state);
|
||||
int cur, dummy;
|
||||
|
||||
|
@ -8656,7 +8656,7 @@ x_check_fullscreen (struct frame *f)
|
|||
if (do_ewmh_fullscreen (f))
|
||||
return;
|
||||
|
||||
if (f->output_data.x->parent_desc != FRAME_X_DISPLAY_INFO (f)->root_window)
|
||||
if (f->output_data.x->parent_desc != FRAME_DISPLAY_INFO (f)->root_window)
|
||||
return; /* Only fullscreen without WM or with EWM hints (above). */
|
||||
|
||||
/* Setting fullscreen to nil doesn't do anything. We could save the
|
||||
|
@ -8666,7 +8666,7 @@ x_check_fullscreen (struct frame *f)
|
|||
if (f->want_fullscreen != FULLSCREEN_NONE)
|
||||
{
|
||||
int width = FRAME_PIXEL_WIDTH (f), height = FRAME_PIXEL_HEIGHT (f);
|
||||
struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
|
||||
struct x_display_info *dpyinfo = FRAME_DISPLAY_INFO (f);
|
||||
|
||||
switch (f->want_fullscreen)
|
||||
{
|
||||
|
@ -8713,7 +8713,7 @@ x_check_expected_move (struct frame *f, int expected_left, int expected_top)
|
|||
int adjusted_left;
|
||||
int adjusted_top;
|
||||
|
||||
FRAME_X_DISPLAY_INFO (f)->wm_type = X_WMTYPE_A;
|
||||
FRAME_DISPLAY_INFO (f)->wm_type = X_WMTYPE_A;
|
||||
FRAME_X_OUTPUT (f)->move_offset_left = expected_left - current_left;
|
||||
FRAME_X_OUTPUT (f)->move_offset_top = expected_top - current_top;
|
||||
|
||||
|
@ -8731,7 +8731,7 @@ x_check_expected_move (struct frame *f, int expected_left, int expected_top)
|
|||
/* It's a "Type B" window manager. We don't have to adjust the
|
||||
frame's position. */
|
||||
|
||||
FRAME_X_DISPLAY_INFO (f)->wm_type = X_WMTYPE_B;
|
||||
FRAME_DISPLAY_INFO (f)->wm_type = X_WMTYPE_B;
|
||||
}
|
||||
|
||||
|
||||
|
@ -9023,7 +9023,7 @@ x_ewmh_activate_frame (struct frame *f)
|
|||
/* See Window Manager Specification/Extended Window Manager Hints at
|
||||
http://freedesktop.org/wiki/Specifications/wm-spec */
|
||||
|
||||
struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
|
||||
struct x_display_info *dpyinfo = FRAME_DISPLAY_INFO (f);
|
||||
|
||||
if (FRAME_VISIBLE_P (f) && wm_supports (f, dpyinfo->Xatom_net_active_window))
|
||||
{
|
||||
|
@ -9057,7 +9057,7 @@ static void
|
|||
xembed_set_info (struct frame *f, enum xembed_info flags)
|
||||
{
|
||||
unsigned long data[2];
|
||||
struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
|
||||
struct x_display_info *dpyinfo = FRAME_DISPLAY_INFO (f);
|
||||
|
||||
data[0] = XEMBED_VERSION;
|
||||
data[1] = flags;
|
||||
|
@ -9076,7 +9076,7 @@ xembed_send_message (struct frame *f, Time t, enum xembed_message msg,
|
|||
|
||||
event.xclient.type = ClientMessage;
|
||||
event.xclient.window = FRAME_X_OUTPUT (f)->parent_desc;
|
||||
event.xclient.message_type = FRAME_X_DISPLAY_INFO (f)->Xatom_XEMBED;
|
||||
event.xclient.message_type = FRAME_DISPLAY_INFO (f)->Xatom_XEMBED;
|
||||
event.xclient.format = 32;
|
||||
event.xclient.data.l[0] = t;
|
||||
event.xclient.data.l[1] = msg;
|
||||
|
@ -9266,8 +9266,8 @@ x_make_frame_invisible (struct frame *f)
|
|||
window = FRAME_OUTER_WINDOW (f);
|
||||
|
||||
/* Don't keep the highlight on an invisible frame. */
|
||||
if (FRAME_X_DISPLAY_INFO (f)->x_highlight_frame == f)
|
||||
FRAME_X_DISPLAY_INFO (f)->x_highlight_frame = 0;
|
||||
if (FRAME_DISPLAY_INFO (f)->x_highlight_frame == f)
|
||||
FRAME_DISPLAY_INFO (f)->x_highlight_frame = 0;
|
||||
|
||||
block_input ();
|
||||
|
||||
|
@ -9321,8 +9321,8 @@ x_iconify_frame (struct frame *f)
|
|||
Lisp_Object type;
|
||||
|
||||
/* Don't keep the highlight on an invisible frame. */
|
||||
if (FRAME_X_DISPLAY_INFO (f)->x_highlight_frame == f)
|
||||
FRAME_X_DISPLAY_INFO (f)->x_highlight_frame = 0;
|
||||
if (FRAME_DISPLAY_INFO (f)->x_highlight_frame == f)
|
||||
FRAME_DISPLAY_INFO (f)->x_highlight_frame = 0;
|
||||
|
||||
if (FRAME_ICONIFIED_P (f))
|
||||
return;
|
||||
|
@ -9397,7 +9397,7 @@ x_iconify_frame (struct frame *f)
|
|||
|
||||
msg.xclient.window = FRAME_X_WINDOW (f);
|
||||
msg.xclient.type = ClientMessage;
|
||||
msg.xclient.message_type = FRAME_X_DISPLAY_INFO (f)->Xatom_wm_change_state;
|
||||
msg.xclient.message_type = FRAME_DISPLAY_INFO (f)->Xatom_wm_change_state;
|
||||
msg.xclient.format = 32;
|
||||
msg.xclient.data.l[0] = IconicState;
|
||||
|
||||
|
@ -9436,7 +9436,7 @@ x_iconify_frame (struct frame *f)
|
|||
void
|
||||
x_free_frame_resources (struct frame *f)
|
||||
{
|
||||
struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
|
||||
struct x_display_info *dpyinfo = FRAME_DISPLAY_INFO (f);
|
||||
Mouse_HLInfo *hlinfo = &dpyinfo->mouse_highlight;
|
||||
#ifdef USE_X_TOOLKIT
|
||||
Lisp_Object bar;
|
||||
|
@ -9559,7 +9559,7 @@ x_free_frame_resources (struct frame *f)
|
|||
static void
|
||||
x_destroy_window (struct frame *f)
|
||||
{
|
||||
struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
|
||||
struct x_display_info *dpyinfo = FRAME_DISPLAY_INFO (f);
|
||||
|
||||
/* If a display connection is dead, don't try sending more
|
||||
commands to the X server. */
|
||||
|
@ -9605,9 +9605,9 @@ x_wm_set_size_hint (struct frame *f, long flags, bool user_position)
|
|||
|
||||
size_hints.width_inc = FRAME_COLUMN_WIDTH (f);
|
||||
size_hints.height_inc = FRAME_LINE_HEIGHT (f);
|
||||
size_hints.max_width = x_display_pixel_width (FRAME_X_DISPLAY_INFO (f))
|
||||
size_hints.max_width = x_display_pixel_width (FRAME_DISPLAY_INFO (f))
|
||||
- FRAME_TEXT_COLS_TO_PIXEL_WIDTH (f, 0);
|
||||
size_hints.max_height = x_display_pixel_height (FRAME_X_DISPLAY_INFO (f))
|
||||
size_hints.max_height = x_display_pixel_height (FRAME_DISPLAY_INFO (f))
|
||||
- FRAME_TEXT_LINES_TO_PIXEL_HEIGHT (f, 0);
|
||||
|
||||
/* Calculate the base and minimum sizes. */
|
||||
|
|
18
src/xterm.h
18
src/xterm.h
|
@ -700,20 +700,20 @@ enum
|
|||
#define FRAME_BASELINE_OFFSET(f) ((f)->output_data.x->baseline_offset)
|
||||
|
||||
/* This gives the x_display_info structure for the display F is on. */
|
||||
#define FRAME_X_DISPLAY_INFO(f) ((f)->output_data.x->display_info)
|
||||
#define FRAME_DISPLAY_INFO(f) ((f)->output_data.x->display_info)
|
||||
|
||||
/* This is the `Display *' which frame F is on. */
|
||||
#define FRAME_X_DISPLAY(f) (FRAME_X_DISPLAY_INFO (f)->display)
|
||||
#define FRAME_X_DISPLAY(f) (FRAME_DISPLAY_INFO (f)->display)
|
||||
|
||||
/* This is the `Screen *' which frame F is on. */
|
||||
#define FRAME_X_SCREEN(f) (FRAME_X_DISPLAY_INFO (f)->screen)
|
||||
#define FRAME_X_SCREEN(f) (FRAME_DISPLAY_INFO (f)->screen)
|
||||
#define FRAME_X_SCREEN_NUMBER(f) XScreenNumberOfScreen (FRAME_X_SCREEN (f))
|
||||
|
||||
/* This is the Visual which frame F is on. */
|
||||
#define FRAME_X_VISUAL(f) FRAME_X_DISPLAY_INFO (f)->visual
|
||||
#define FRAME_X_VISUAL(f) FRAME_DISPLAY_INFO (f)->visual
|
||||
|
||||
/* This is the Colormap which frame F uses. */
|
||||
#define FRAME_X_COLORMAP(f) FRAME_X_DISPLAY_INFO (f)->cmap
|
||||
#define FRAME_X_COLORMAP(f) FRAME_DISPLAY_INFO (f)->cmap
|
||||
|
||||
/* The difference in pixels between the top left corner of the
|
||||
Emacs window (including possible window manager decorations)
|
||||
|
@ -726,20 +726,20 @@ enum
|
|||
|
||||
|
||||
#define FRAME_XIC(f) ((f)->output_data.x->xic)
|
||||
#define FRAME_X_XIM(f) (FRAME_X_DISPLAY_INFO (f)->xim)
|
||||
#define FRAME_X_XIM_STYLES(f) (FRAME_X_DISPLAY_INFO (f)->xim_styles)
|
||||
#define FRAME_X_XIM(f) (FRAME_DISPLAY_INFO (f)->xim)
|
||||
#define FRAME_X_XIM_STYLES(f) (FRAME_DISPLAY_INFO (f)->xim_styles)
|
||||
#define FRAME_XIC_STYLE(f) ((f)->output_data.x->xic_style)
|
||||
#define FRAME_XIC_FONTSET(f) ((f)->output_data.x->xic_xfs)
|
||||
|
||||
/* Value is the smallest width of any character in any font on frame F. */
|
||||
|
||||
#define FRAME_SMALLEST_CHAR_WIDTH(F) \
|
||||
FRAME_X_DISPLAY_INFO(F)->smallest_char_width
|
||||
FRAME_DISPLAY_INFO(F)->smallest_char_width
|
||||
|
||||
/* Value is the smallest height of any font on frame F. */
|
||||
|
||||
#define FRAME_SMALLEST_FONT_HEIGHT(F) \
|
||||
FRAME_X_DISPLAY_INFO(F)->smallest_font_height
|
||||
FRAME_DISPLAY_INFO(F)->smallest_font_height
|
||||
|
||||
/* X-specific scroll bar stuff. */
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue