Commit 18779109 authored by Armin Krezović's avatar Armin Krezović Committed by Jonas Ådahl

Start populating MetaX11Display

- Moved xdisplay, name and various atoms from MetaDisplay
- Moved xroot, screen_name, default_depth and default_xvisual
  from MetaScreen

- Moved some X11 specific functions from screen.c and display.c
  to meta-x11-display.c

https://bugzilla.gnome.org/show_bug.cgi?id=759538
parent 522f9b4c
......@@ -23,6 +23,7 @@
#include <X11/extensions/Xfixes.h>
#include "core/display-private.h"
#include "meta/meta-x11-display.h"
enum
{
......@@ -118,6 +119,8 @@ meta_cursor_sprite_xfixes_initable_init (GInitable *initable,
MetaCursorSpriteXfixes *sprite_xfixes =
META_CURSOR_SPRITE_XFIXES (initable);
MetaCursorSprite *sprite = META_CURSOR_SPRITE (sprite_xfixes);
MetaX11Display *x11_display;
Display *xdisplay;
XFixesCursorImage *cursor_image;
CoglTexture2D *texture;
uint8_t *cursor_data;
......@@ -125,7 +128,9 @@ meta_cursor_sprite_xfixes_initable_init (GInitable *initable,
ClutterBackend *clutter_backend;
CoglContext *cogl_context;
cursor_image = XFixesGetCursorImage (sprite_xfixes->display->xdisplay);
x11_display = meta_display_get_x11_display (sprite_xfixes->display);
xdisplay = meta_x11_display_get_xdisplay (x11_display);
cursor_image = XFixesGetCursorImage (xdisplay);
if (!cursor_image)
{
g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
......
......@@ -40,6 +40,7 @@
#include <meta/barrier.h>
#include "backends/x11/meta-barrier-x11.h"
#include "display-private.h"
#include "x11/meta-x11-display-private.h"
struct _MetaBarrierImplX11Private
{
......@@ -68,10 +69,11 @@ _meta_barrier_impl_x11_release (MetaBarrierImpl *impl,
MetaBarrierImplX11Private *priv =
meta_barrier_impl_x11_get_instance_private (self);
MetaDisplay *display = priv->barrier->priv->display;
Display *dpy = meta_x11_display_get_xdisplay (display->x11_display);
if (META_DISPLAY_HAS_XINPUT_23 (display))
{
XIBarrierReleasePointer (display->xdisplay,
XIBarrierReleasePointer (dpy,
META_VIRTUAL_CORE_POINTER_ID,
priv->xbarrier, event->event_id);
}
......@@ -89,7 +91,7 @@ _meta_barrier_impl_x11_destroy (MetaBarrierImpl *impl)
if (display == NULL)
return;
dpy = display->xdisplay;
dpy = meta_x11_display_get_xdisplay (display->x11_display);
if (!meta_barrier_is_active (priv->barrier))
return;
......@@ -119,7 +121,7 @@ meta_barrier_impl_x11_new (MetaBarrier *barrier)
priv = meta_barrier_impl_x11_get_instance_private (self);
priv->barrier = barrier;
dpy = display->xdisplay;
dpy = meta_x11_display_get_xdisplay (display->x11_display);
root = DefaultRootWindow (dpy);
allowed_motion_dirs =
......
......@@ -80,6 +80,8 @@
#include "backends/x11/meta-backend-x11.h"
#include "clutter/clutter-mutter.h"
#include "x11/meta-x11-display-private.h"
#ifdef HAVE_WAYLAND
#include "wayland/meta-wayland-private.h"
#endif
......@@ -232,7 +234,7 @@ meta_set_stage_input_region (MetaScreen *screen,
{
MetaDisplay *display = screen->display;
MetaCompositor *compositor = display->compositor;
Display *xdpy = meta_display_get_xdisplay (display);
Display *xdpy = meta_x11_display_get_xdisplay (display->x11_display);
Window xstage = clutter_x11_get_stage_window (CLUTTER_STAGE (compositor->stage));
XFixesSetWindowShapeRegion (xdpy, xstage, ShapeInput, 0, 0, region);
......@@ -256,7 +258,7 @@ meta_empty_stage_input_region (MetaScreen *screen)
if (region == None)
{
MetaDisplay *display = meta_screen_get_display (screen);
Display *xdpy = meta_display_get_xdisplay (display);
Display *xdpy = meta_x11_display_get_xdisplay (display->x11_display);
region = XFixesCreateRegion (xdpy, NULL, 0);
}
......@@ -365,10 +367,10 @@ meta_begin_modal_for_plugin (MetaCompositor *compositor,
return FALSE;
/* XXX: why is this needed? */
XIUngrabDevice (display->xdisplay,
XIUngrabDevice (display->x11_display->xdisplay,
META_VIRTUAL_CORE_POINTER_ID,
timestamp);
XSync (display->xdisplay, False);
XSync (display->x11_display->xdisplay, False);
if (!grab_devices (options, timestamp))
return FALSE;
......@@ -447,12 +449,13 @@ after_stage_paint (ClutterStage *stage,
static void
redirect_windows (MetaScreen *screen)
{
MetaDisplay *display = meta_screen_get_display (screen);
Display *xdisplay = meta_display_get_xdisplay (display);
Window xroot = meta_screen_get_xroot (screen);
int screen_number = meta_screen_get_screen_number (screen);
guint n_retries;
guint max_retries;
MetaDisplay *display = meta_screen_get_display (screen);
MetaX11Display *x11_display = meta_display_get_x11_display (display);
Display *xdisplay = meta_x11_display_get_xdisplay (x11_display);
Window xroot = meta_x11_display_get_xroot (x11_display);
int screen_number = meta_x11_display_get_screen_number (x11_display);
guint n_retries;
guint max_retries;
if (meta_get_replace_current_wm ())
max_retries = 5;
......@@ -479,7 +482,7 @@ redirect_windows (MetaScreen *screen)
/* This probably means that a non-WM compositor like xcompmgr is running;
* we have no way to get it to exit */
meta_fatal (_("Another compositing manager is already running on screen %i on display “%s”."),
screen_number, display->name);
screen_number, x11_display->name);
}
n_retries++;
......@@ -491,7 +494,7 @@ void
meta_compositor_manage (MetaCompositor *compositor)
{
MetaDisplay *display = compositor->display;
Display *xdisplay = display->xdisplay;
Display *xdisplay = display->x11_display->xdisplay;
MetaScreen *screen = display->screen;
MetaBackend *backend = meta_get_backend ();
......@@ -571,9 +574,9 @@ meta_compositor_unmanage (MetaCompositor *compositor)
{
if (!meta_is_wayland_compositor ())
{
MetaDisplay *display = compositor->display;
Display *xdisplay = meta_display_get_xdisplay (display);
Window xroot = display->screen->xroot;
MetaX11Display *display = compositor->display->x11_display;
Display *xdisplay = display->xdisplay;
Window xroot = display->xroot;
/* This is the most important part of cleanup - we have to do this
* before giving up the window manager selection or the next
......@@ -598,7 +601,7 @@ meta_shape_cow_for_window (MetaCompositor *compositor,
MetaWindow *window)
{
MetaDisplay *display = compositor->display;
Display *xdisplay = meta_display_get_xdisplay (display);
Display *xdisplay = meta_x11_display_get_xdisplay (display->x11_display);
if (window == NULL)
XFixesSetWindowShapeRegion (xdisplay, compositor->output, ShapeBounding, 0, 0, None);
......@@ -1169,7 +1172,7 @@ meta_pre_paint_func (gpointer data)
if (compositor->have_x11_sync_object)
compositor->have_x11_sync_object = meta_sync_ring_insert_wait ();
else
XSync (compositor->display->xdisplay, False);
XSync (compositor->display->x11_display->xdisplay, False);
}
return TRUE;
......
......@@ -27,6 +27,7 @@
#include "core/display-private.h"
#include "backends/meta-dnd-private.h"
#include "meta/meta-dnd.h"
#include "x11/meta-x11-display-private.h"
struct _MetaDndClass
{
......@@ -159,7 +160,7 @@ meta_dnd_handle_xdnd_event (MetaBackend *backend,
memset (&xevent, 0, sizeof(xevent));
xevent.xany.type = ClientMessage;
xevent.xany.display = display->xdisplay;
xevent.xany.display = display->x11_display->xdisplay;
xevent.xclient.window = src;
xevent.xclient.message_type = gdk_x11_get_xatom_by_name ("XdndStatus");
xevent.xclient.format = 32;
......@@ -168,7 +169,7 @@ meta_dnd_handle_xdnd_event (MetaBackend *backend,
xevent.xclient.data.l[1] = 2;
xevent.xclient.data.l[4] = None;
XSendEvent (display->xdisplay, src, False, 0, &xevent);
XSendEvent (display->x11_display->xdisplay, src, False, 0, &xevent);
meta_dnd_notify_dnd_position_change (dnd,
(int)(xev->xclient.data.l[2] >> 16),
......
......@@ -35,6 +35,7 @@
#include "meta-shaped-texture-private.h"
#include "meta-cullable.h"
#include "x11/window-x11.h"
#include "x11/meta-x11-display-private.h"
struct _MetaSurfaceActorX11Private
{
......@@ -68,7 +69,7 @@ free_damage (MetaSurfaceActorX11 *self)
{
MetaSurfaceActorX11Private *priv = meta_surface_actor_x11_get_instance_private (self);
MetaDisplay *display = priv->display;
Display *xdisplay = meta_display_get_xdisplay (display);
Display *xdisplay = meta_x11_display_get_xdisplay (display->x11_display);
if (priv->damage == None)
return;
......@@ -84,7 +85,7 @@ detach_pixmap (MetaSurfaceActorX11 *self)
{
MetaSurfaceActorX11Private *priv = meta_surface_actor_x11_get_instance_private (self);
MetaDisplay *display = priv->display;
Display *xdisplay = meta_display_get_xdisplay (display);
Display *xdisplay = meta_x11_display_get_xdisplay (display->x11_display);
MetaShapedTexture *stex = meta_surface_actor_get_texture (META_SURFACE_ACTOR (self));
if (priv->pixmap == None)
......@@ -138,7 +139,7 @@ update_pixmap (MetaSurfaceActorX11 *self)
{
MetaSurfaceActorX11Private *priv = meta_surface_actor_x11_get_instance_private (self);
MetaDisplay *display = priv->display;
Display *xdisplay = meta_display_get_xdisplay (display);
Display *xdisplay = meta_x11_display_get_xdisplay (display->x11_display);
if (priv->size_changed)
{
......@@ -223,7 +224,7 @@ meta_surface_actor_x11_pre_paint (MetaSurfaceActor *actor)
MetaSurfaceActorX11 *self = META_SURFACE_ACTOR_X11 (actor);
MetaSurfaceActorX11Private *priv = meta_surface_actor_x11_get_instance_private (self);
MetaDisplay *display = priv->display;
Display *xdisplay = meta_display_get_xdisplay (display);
Display *xdisplay = meta_x11_display_get_xdisplay (display->x11_display);
if (priv->received_damage)
{
......@@ -311,7 +312,7 @@ sync_unredirected (MetaSurfaceActorX11 *self)
{
MetaSurfaceActorX11Private *priv = meta_surface_actor_x11_get_instance_private (self);
MetaDisplay *display = priv->display;
Display *xdisplay = meta_display_get_xdisplay (display);
Display *xdisplay = meta_x11_display_get_xdisplay (display->x11_display);
Window xwindow = meta_window_x11_get_toplevel_xwindow (priv->window);
meta_error_trap_push (display);
......@@ -403,7 +404,7 @@ static void
create_damage (MetaSurfaceActorX11 *self)
{
MetaSurfaceActorX11Private *priv = meta_surface_actor_x11_get_instance_private (self);
Display *xdisplay = meta_display_get_xdisplay (priv->display);
Display *xdisplay = meta_x11_display_get_xdisplay (priv->display->x11_display);
Window xwindow = meta_window_x11_get_toplevel_xwindow (priv->window);
priv->damage = XDamageCreate (xdisplay, xwindow, XDamageReportBoundingBox);
......
......@@ -37,6 +37,8 @@
#include "meta-surface-actor.h"
#include "meta-surface-actor-x11.h"
#include "x11/meta-x11-display-private.h"
#ifdef HAVE_WAYLAND
#include "meta-surface-actor-wayland.h"
#include "wayland/meta-wayland-surface.h"
......@@ -1971,7 +1973,7 @@ do_send_frame_drawn (MetaWindowActor *self, FrameData *frame)
{
MetaWindowActorPrivate *priv = self->priv;
MetaDisplay *display = meta_window_get_display (priv->window);
Display *xdisplay = meta_display_get_xdisplay (display);
Display *xdisplay = meta_x11_display_get_xdisplay (display->x11_display);
XClientMessageEvent ev = { 0, };
......@@ -1981,7 +1983,7 @@ do_send_frame_drawn (MetaWindowActor *self, FrameData *frame)
ev.type = ClientMessage;
ev.window = meta_window_get_xwindow (priv->window);
ev.message_type = display->atom__NET_WM_FRAME_DRAWN;
ev.message_type = display->x11_display->atom__NET_WM_FRAME_DRAWN;
ev.format = 32;
ev.data.l[0] = frame->sync_request_serial & G_GUINT64_CONSTANT(0xffffffff);
ev.data.l[1] = frame->sync_request_serial >> 32;
......@@ -2039,13 +2041,13 @@ do_send_frame_timings (MetaWindowActor *self,
{
MetaWindowActorPrivate *priv = self->priv;
MetaDisplay *display = meta_window_get_display (priv->window);
Display *xdisplay = meta_display_get_xdisplay (display);
Display *xdisplay = meta_x11_display_get_xdisplay (display->x11_display);
XClientMessageEvent ev = { 0, };
ev.type = ClientMessage;
ev.window = meta_window_get_xwindow (priv->window);
ev.message_type = display->atom__NET_WM_FRAME_TIMINGS;
ev.message_type = display->x11_display->atom__NET_WM_FRAME_TIMINGS;
ev.format = 32;
ev.data.l[0] = frame->sync_request_serial & G_GUINT64_CONSTANT(0xffffffff);
ev.data.l[1] = frame->sync_request_serial >> 32;
......
......@@ -53,6 +53,7 @@
#include "window-private.h"
#include "util-private.h"
#include "compositor/compositor-private.h"
#include "x11/meta-x11-display-private.h"
#include <meta/prefs.h>
#include <meta/compositor.h>
#ifdef HAVE_LIBCANBERRA
......@@ -229,6 +230,7 @@ meta_bell_notify (MetaDisplay *display,
void
meta_bell_set_audible (MetaDisplay *display, gboolean audible)
{
MetaX11Display *x11_display = display->x11_display;
#ifdef HAVE_LIBCANBERRA
/* When we are playing sounds using libcanberra support, we handle the
* bell whether its an audible bell or a visible bell */
......@@ -237,7 +239,7 @@ meta_bell_set_audible (MetaDisplay *display, gboolean audible)
gboolean enable_system_bell = audible;
#endif /* HAVE_LIBCANBERRA */
XkbChangeEnabledControls (display->xdisplay,
XkbChangeEnabledControls (x11_display->xdisplay,
XkbUseCoreKbd,
XkbAudibleBellMask,
enable_system_bell ? XkbAudibleBellMask : 0);
......@@ -247,8 +249,9 @@ gboolean
meta_bell_init (MetaDisplay *display)
{
int xkb_base_error_type, xkb_opcode;
MetaX11Display *x11_display = display->x11_display;
if (!XkbQueryExtension (display->xdisplay, &xkb_opcode,
if (!XkbQueryExtension (x11_display->xdisplay, &xkb_opcode,
&display->xkb_base_event_type,
&xkb_base_error_type,
NULL, NULL))
......@@ -262,13 +265,13 @@ meta_bell_init (MetaDisplay *display)
unsigned int mask = XkbBellNotifyMask;
gboolean visual_bell_auto_reset = FALSE;
/* TRUE if and when non-broken version is available */
XkbSelectEvents (display->xdisplay,
XkbSelectEvents (x11_display->xdisplay,
XkbUseCoreKbd,
XkbBellNotifyMask,
XkbBellNotifyMask);
meta_bell_set_audible (display, meta_prefs_bell_is_audible ());
if (visual_bell_auto_reset) {
XkbSetAutoResetControls (display->xdisplay,
XkbSetAutoResetControls (x11_display->xdisplay,
XkbAudibleBellMask,
&mask,
&mask);
......@@ -281,8 +284,10 @@ meta_bell_init (MetaDisplay *display)
void
meta_bell_shutdown (MetaDisplay *display)
{
MetaX11Display *x11_display = display->x11_display;
/* TODO: persist initial bell state in display, reset here */
XkbChangeEnabledControls (display->xdisplay,
XkbChangeEnabledControls (x11_display->xdisplay,
XkbUseCoreKbd,
XkbAudibleBellMask,
XkbAudibleBellMask);
......
......@@ -112,21 +112,11 @@ struct _MetaDisplay
MetaX11Display *x11_display;
char *name;
Display *xdisplay;
int clutter_event_filter;
Window leader_window;
Window timestamp_pinging_window;
/* Pull in all the names of atoms as fields; we will intern them when the
* class is constructed.
*/
#define item(x) Atom atom_##x;
#include <x11/atomnames.h>
#undef item
/* The window and serial of the most recent FocusIn event. */
Window server_focus_window;
gulong server_focus_serial;
......@@ -391,9 +381,6 @@ GSList* meta_display_list_windows (MetaDisplay *display,
MetaDisplay* meta_display_for_x_display (Display *xdisplay);
MetaDisplay* meta_get_display (void);
Cursor meta_display_create_x_cursor (MetaDisplay *display,
MetaCursor cursor);
void meta_display_update_cursor (MetaDisplay *display);
void meta_display_check_threshold_reached (MetaDisplay *display,
......
......@@ -572,7 +572,7 @@ gesture_tracker_state_changed (MetaGestureTracker *tracker,
XIAllowTouchEvents (meta_backend_x11_get_xdisplay (backend),
META_VIRTUAL_CORE_POINTER_ID,
clutter_x11_event_sequence_get_touch_detail (sequence),
DefaultRootWindow (display->xdisplay), event_mode);
DefaultRootWindow (display->x11_display->xdisplay), event_mode);
}
}
......@@ -612,33 +612,6 @@ meta_display_open (void)
guint32 timestamp;
Window old_active_xwindow = None;
/* A list of all atom names, so that we can intern them in one go. */
const char *atom_names[] = {
#define item(x) #x,
#include <x11/atomnames.h>
#undef item
};
Atom atoms[G_N_ELEMENTS(atom_names)];
meta_verbose ("Opening display '%s'\n", XDisplayName (NULL));
xdisplay = meta_ui_get_display ();
if (xdisplay == NULL)
{
meta_warning (_("Failed to open X Window System display “%s”\n"),
XDisplayName (NULL));
return FALSE;
}
#ifdef HAVE_WAYLAND
if (meta_is_wayland_compositor ())
meta_xwayland_complete_init ();
#endif
if (meta_is_syncing ())
XSynchronize (xdisplay, True);
g_assert (the_display == NULL);
display = the_display = g_object_new (META_TYPE_DISPLAY, NULL);
......@@ -693,12 +666,7 @@ meta_display_open (void)
display->x11_display = x11_display;
g_signal_emit (display, display_signals[X11_DISPLAY_OPENED], 0);
/* here we use XDisplayName which is what the user
* probably put in, vs. DisplayString(display) which is
* canonicalized by XOpenDisplay()
*/
display->name = g_strdup (XDisplayName (NULL));
display->xdisplay = xdisplay;
xdisplay = display->x11_display->xdisplay;
display->focus_serial = 0;
display->server_focus_window = None;
......@@ -706,15 +674,6 @@ meta_display_open (void)
meta_bell_init (display);
meta_verbose ("Creating %d atoms\n", (int) G_N_ELEMENTS (atom_names));
XInternAtoms (display->xdisplay, (char **)atom_names, G_N_ELEMENTS (atom_names),
False, atoms);
i = 0;
#define item(x) display->atom_##x = atoms[i++];
#include <x11/atomnames.h>
#undef item
display->prop_hooks = NULL;
meta_display_init_window_prop_hooks (display);
display->group_prop_hooks = NULL;
......@@ -745,10 +704,10 @@ meta_display_open (void)
major = SYNC_MAJOR_VERSION;
minor = SYNC_MINOR_VERSION;
if (!XSyncQueryExtension (display->xdisplay,
if (!XSyncQueryExtension (xdisplay,
&display->xsync_event_base,
&display->xsync_error_base) ||
!XSyncInitialize (display->xdisplay,
!XSyncInitialize (xdisplay,
&major, &minor))
{
display->xsync_error_base = 0;
......@@ -757,7 +716,7 @@ meta_display_open (void)
else
{
display->have_xsync = TRUE;
XSyncSetPriority (display->xdisplay, None, 10);
XSyncSetPriority (xdisplay, None, 10);
}
meta_verbose ("Attempted to init Xsync, found version %d.%d error base %d event base %d\n",
......@@ -772,7 +731,7 @@ meta_display_open (void)
display->shape_error_base = 0;
display->shape_event_base = 0;
if (!XShapeQueryExtension (display->xdisplay,
if (!XShapeQueryExtension (xdisplay,
&display->shape_event_base,
&display->shape_error_base))
{
......@@ -793,7 +752,7 @@ meta_display_open (void)
display->composite_error_base = 0;
display->composite_event_base = 0;
if (!XCompositeQueryExtension (display->xdisplay,
if (!XCompositeQueryExtension (xdisplay,
&display->composite_event_base,
&display->composite_error_base))
{
......@@ -804,7 +763,7 @@ meta_display_open (void)
{
display->composite_major_version = 0;
display->composite_minor_version = 0;
if (XCompositeQueryVersion (display->xdisplay,
if (XCompositeQueryVersion (xdisplay,
&display->composite_major_version,
&display->composite_minor_version))
{
......@@ -829,7 +788,7 @@ meta_display_open (void)
display->damage_error_base = 0;
display->damage_event_base = 0;
if (!XDamageQueryExtension (display->xdisplay,
if (!XDamageQueryExtension (xdisplay,
&display->damage_event_base,
&display->damage_error_base))
{
......@@ -846,13 +805,13 @@ meta_display_open (void)
display->xfixes_error_base = 0;
display->xfixes_event_base = 0;
if (XFixesQueryExtension (display->xdisplay,
if (XFixesQueryExtension (xdisplay,
&display->xfixes_event_base,
&display->xfixes_error_base))
{
int xfixes_major, xfixes_minor;
XFixesQueryVersion (display->xdisplay, &xfixes_major, &xfixes_minor);
XFixesQueryVersion (xdisplay, &xfixes_major, &xfixes_minor);
if (xfixes_major * 100 + xfixes_minor < 500)
meta_fatal ("Mutter requires XFixes 5.0");
......@@ -871,13 +830,13 @@ meta_display_open (void)
int major = 2, minor = 3;
gboolean has_xi = FALSE;
if (XQueryExtension (display->xdisplay,
if (XQueryExtension (xdisplay,
"XInputExtension",
&display->xinput_opcode,
&display->xinput_error_base,
&display->xinput_event_base))
{
if (XIQueryVersion (display->xdisplay, &major, &minor) == Success)
if (XIQueryVersion (xdisplay, &major, &minor) == Success)
{
int version = (major * 10) + minor;
if (version >= 22)
......@@ -910,33 +869,33 @@ meta_display_open (void)
* 354213 for details.
*/
display->leader_window =
meta_create_offscreen_window (display->xdisplay,
DefaultRootWindow (display->xdisplay),
PropertyChangeMask);
meta_x11_display_create_offscreen_window (display->x11_display,
DefaultRootWindow (xdisplay),
PropertyChangeMask);
meta_prop_set_utf8_string_hint (display,
display->leader_window,
display->atom__NET_WM_NAME,
display->x11_display->atom__NET_WM_NAME,
net_wm_name);
meta_prop_set_utf8_string_hint (display,
display->leader_window,
display->atom__GNOME_WM_KEYBINDINGS,
display->x11_display->atom__GNOME_WM_KEYBINDINGS,
gnome_wm_keybindings);
meta_prop_set_utf8_string_hint (display,
display->leader_window,
display->atom__MUTTER_VERSION,
display->x11_display->atom__MUTTER_VERSION,
VERSION);
data[0] = display->leader_window;
XChangeProperty (display->xdisplay,
XChangeProperty (xdisplay,
display->leader_window,
display->atom__NET_SUPPORTING_WM_CHECK,
display->x11_display->atom__NET_SUPPORTING_WM_CHECK,
XA_WINDOW,
32, PropModeReplace, (guchar*) data, 1);
XWindowEvent (display->xdisplay,
XWindowEvent (xdisplay,
display->leader_window,
PropertyChangeMask,
&event);
......@@ -946,7 +905,7 @@ meta_display_open (void)
/* Make it painfully clear that we can't rely on PropertyNotify events on
* this window, as per bug 354213.
*/
XSelectInput(display->xdisplay,
XSelectInput(xdisplay,
display->leader_window,
NoEventMask);
}
......@@ -955,9 +914,9 @@ meta_display_open (void)
* that meta_create_offscreen_window already selects for PropertyChangeMask.
*/
display->timestamp_pinging_window =
meta_create_offscreen_window (display->xdisplay,
DefaultRootWindow (display->xdisplay),
PropertyChangeMask);
meta_x11_display_create_offscreen_window (display->x11_display,
DefaultRootWindow (xdisplay),
PropertyChangeMask);
display->last_focus_time = timestamp;
display->last_user_time = timestamp;
......@@ -981,8 +940,8 @@ meta_display_open (void)
display->screen = screen;