Commit 4db086da authored by Benjamin Otte's avatar Benjamin Otte Committed by Matthias Clasen

x11: Rename GdkDisplayX11 to GdkX11Display

Also rename all the macros etc.
parent 8e2240f6
......@@ -146,7 +146,7 @@ find_in_cache (GdkDisplay *display,
return NULL;
}
/* Called by gdk_display_x11_finalize to flush any cached cursors
/* Called by gdk_x11_display_finalize to flush any cached cursors
* for a dead display.
*/
void
......@@ -397,7 +397,7 @@ _gdk_x11_cursor_update_theme (GdkCursor *cursor)
GdkX11Display *display_x11;
private = (GdkX11Cursor *) cursor;
display_x11 = GDK_DISPLAY_X11 (gdk_cursor_get_display (cursor));
display_x11 = GDK_X11_DISPLAY (gdk_cursor_get_display (cursor));
xdisplay = GDK_DISPLAY_XDISPLAY (display_x11);
if (!display_x11->have_xfixes)
......@@ -476,7 +476,7 @@ gdk_x11_display_set_cursor_theme (GdkDisplay *display,
g_return_if_fail (GDK_IS_DISPLAY (display));
display_x11 = GDK_DISPLAY_X11 (display);
display_x11 = GDK_X11_DISPLAY (display);
xdisplay = GDK_DISPLAY_XDISPLAY (display);
old_theme = XcursorGetTheme (xdisplay);
......
......@@ -247,7 +247,7 @@ gdk_device_core_query_state (GdkDevice *device,
display = gdk_window_get_display (window);
default_screen = gdk_display_get_default_screen (display);
if (G_LIKELY (GDK_DISPLAY_X11 (display)->trusted_client))
if (G_LIKELY (GDK_X11_DISPLAY (display)->trusted_client))
{
if (!XQueryPointer (GDK_WINDOW_XDISPLAY (window),
GDK_WINDOW_XID (window),
......@@ -437,7 +437,7 @@ gdk_device_core_window_at_position (GdkDevice *device,
xdisplay = GDK_SCREEN_XDISPLAY (screen);
xwindow = GDK_SCREEN_XROOTWIN (screen);
if (G_LIKELY (GDK_DISPLAY_X11 (display)->trusted_client))
if (G_LIKELY (GDK_X11_DISPLAY (display)->trusted_client))
{
XQueryPointer (xdisplay, xwindow,
&root, &child,
......
......@@ -310,7 +310,7 @@ gdk_device_xi2_query_state (GdkDevice *device,
display = gdk_window_get_display (window);
default_screen = gdk_display_get_default_screen (display);
if (G_LIKELY (GDK_DISPLAY_X11 (display)->trusted_client))
if (G_LIKELY (GDK_X11_DISPLAY (display)->trusted_client))
{
if (!XIQueryPointer (GDK_WINDOW_XDISPLAY (window),
priv->device_id,
......@@ -481,7 +481,7 @@ gdk_device_xi2_window_at_position (GdkDevice *device,
xdisplay = GDK_SCREEN_XDISPLAY (screen);
xwindow = GDK_SCREEN_XROOTWIN (screen);
if (G_LIKELY (GDK_DISPLAY_X11 (display)->trusted_client))
if (G_LIKELY (GDK_X11_DISPLAY (display)->trusted_client))
{
XIQueryPointer (xdisplay,
priv->device_id,
......
......@@ -417,7 +417,7 @@ gdk_device_manager_core_translate_event (GdkEventTranslator *translator,
GdkWindowImplX11 *window_impl = NULL;
gboolean return_val;
GdkToplevelX11 *toplevel = NULL;
GdkX11Display *display_x11 = GDK_DISPLAY_X11 (display);
GdkX11Display *display_x11 = GDK_X11_DISPLAY (display);
device_manager = GDK_DEVICE_MANAGER_CORE (translator);
return_val = FALSE;
......
This diff is collapsed.
......@@ -21,8 +21,8 @@
* Boston, MA 02111-1307, USA.
*/
#ifndef __GDK_DISPLAY_X11__
#define __GDK_DISPLAY_X11__
#ifndef __GDK_X11_DISPLAY__
#define __GDK_X11_DISPLAY__
#include "gdkdisplayprivate.h"
#include "gdkkeys.h"
......@@ -38,11 +38,11 @@ G_BEGIN_DECLS
typedef struct _GdkX11Display GdkX11Display;
typedef struct _GdkX11DisplayClass GdkX11DisplayClass;
#define GDK_TYPE_DISPLAY_X11 (_gdk_display_x11_get_type())
#define GDK_DISPLAY_X11(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_DISPLAY_X11, GdkX11Display))
#define GDK_DISPLAY_X11_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_DISPLAY_X11, GdkX11DisplayClass))
#define GDK_IS_DISPLAY_X11_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_DISPLAY_X11))
#define GDK_DISPLAY_X11_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_DISPLAY_X11, GdkX11DisplayClass))
#define GDK_TYPE_X11_DISPLAY (_gdk_x11_display_get_type())
#define GDK_X11_DISPLAY(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_X11_DISPLAY, GdkX11Display))
#define GDK_X11_DISPLAY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_X11_DISPLAY, GdkX11DisplayClass))
#define GDK_IS_X11_DISPLAY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_X11_DISPLAY))
#define GDK_X11_DISPLAY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_X11_DISPLAY, GdkX11DisplayClass))
struct _GdkX11Display
{
......@@ -148,7 +148,7 @@ struct _GdkX11DisplayClass
GdkDisplayClass parent_class;
};
GType _gdk_display_x11_get_type (void);
GType _gdk_x11_display_get_type (void);
GdkScreen *_gdk_x11_display_screen_for_xrootwin (GdkDisplay *display,
Window xrootwin);
void _gdk_x11_display_error_event (GdkDisplay *display,
......@@ -156,4 +156,4 @@ void _gdk_x11_display_error_event (GdkDisplay *display,
G_END_DECLS
#endif /* __GDK_DISPLAY_X11__ */
#endif /* __GDK_X11_DISPLAY__ */
......@@ -298,7 +298,7 @@ free_cache_child (GdkCacheChild *child,
if (child->shape_selected && display)
{
GdkX11Display *display_x11 = GDK_DISPLAY_X11 (display);
GdkX11Display *display_x11 = GDK_X11_DISPLAY (display);
XShapeSelectInput (display_x11->xdisplay, child->xid, 0);
}
......@@ -337,7 +337,7 @@ gdk_window_cache_shape_filter (GdkXEvent *xev,
XEvent *xevent = (XEvent *)xev;
GdkWindowCache *cache = data;
GdkX11Display *display = GDK_DISPLAY_X11 (gdk_screen_get_display (cache->screen));
GdkX11Display *display = GDK_X11_DISPLAY (gdk_screen_get_display (cache->screen));
if (display->have_shapes &&
xevent->type == display->shape_event_base + ShapeNotify)
......@@ -505,7 +505,7 @@ gdk_window_cache_new (GdkScreen *screen)
XGetWindowAttributes (xdisplay, GDK_WINDOW_XID (root_window), &xwa);
result->old_event_mask = xwa.your_event_mask;
if (G_UNLIKELY (!GDK_DISPLAY_X11 (GDK_SCREEN_X11 (screen)->display)->trusted_client))
if (G_UNLIKELY (!GDK_X11_DISPLAY (GDK_SCREEN_X11 (screen)->display)->trusted_client))
{
GList *toplevel_windows, *list;
GdkWindow *window;
......@@ -594,14 +594,14 @@ is_pointer_within_shape (GdkDisplay *display,
{
if (!child->shape_selected)
{
GdkX11Display *display_x11 = GDK_DISPLAY_X11 (display);
GdkX11Display *display_x11 = GDK_X11_DISPLAY (display);
XShapeSelectInput (display_x11->xdisplay, child->xid, ShapeNotifyMask);
child->shape_selected = TRUE;
}
if (!child->shape_valid)
{
GdkX11Display *display_x11 = GDK_DISPLAY_X11 (display);
GdkX11Display *display_x11 = GDK_X11_DISPLAY (display);
cairo_region_t *input_shape;
child->shape = _gdk_x11_xwindow_get_shape (display_x11->xdisplay,
......@@ -884,7 +884,7 @@ motif_drag_window_filter (GdkXEvent *xevent,
{
XEvent *xev = (XEvent *)xevent;
GdkDisplay *display = GDK_WINDOW_DISPLAY (event->any.window);
GdkX11Display *display_x11 = GDK_DISPLAY_X11 (display);
GdkX11Display *display_x11 = GDK_X11_DISPLAY (display);
switch (xev->xany.type)
{
......@@ -921,7 +921,7 @@ motif_lookup_drag_window (GdkDisplay *display,
{
retval = *(Window *)data;
GDK_NOTE (DND,
g_message ("Found drag window %#lx\n", GDK_DISPLAY_X11 (display)->motif_drag_window));
g_message ("Found drag window %#lx\n", GDK_X11_DISPLAY (display)->motif_drag_window));
}
if (type != None)
......@@ -937,7 +937,7 @@ static Window
motif_find_drag_window (GdkDisplay *display,
gboolean create)
{
GdkX11Display *display_x11 = GDK_DISPLAY_X11 (display);
GdkX11Display *display_x11 = GDK_X11_DISPLAY (display);
if (!display_x11->motif_drag_window)
{
......@@ -1002,7 +1002,7 @@ motif_find_drag_window (GdkDisplay *display,
static void
motif_read_target_table (GdkDisplay *display)
{
GdkX11Display *display_x11 = GDK_DISPLAY_X11 (display);
GdkX11Display *display_x11 = GDK_X11_DISPLAY (display);
gulong bytes_after, nitems;
Atom type;
gint format;
......@@ -1128,7 +1128,7 @@ static gint
motif_target_table_check (GdkDisplay *display,
GList *sorted)
{
GdkX11Display *display_x11 = GDK_DISPLAY_X11 (display);
GdkX11Display *display_x11 = GDK_X11_DISPLAY (display);
GList *tmp_list1, *tmp_list2;
gint i;
......@@ -1156,7 +1156,7 @@ static gint
motif_add_to_target_table (GdkDisplay *display,
GList *targets) /* targets is list of GdkAtom */
{
GdkX11Display *display_x11 = GDK_DISPLAY_X11 (display);
GdkX11Display *display_x11 = GDK_X11_DISPLAY (display);
GList *sorted = NULL;
gint index = -1;
gint i;
......@@ -1428,7 +1428,7 @@ motif_send_enter (GdkDragContextX11 *context_x11,
GdkDisplay *display = GDK_WINDOW_DISPLAY (context->source_window);
XEvent xev;
if (!G_LIKELY (GDK_DISPLAY_X11 (display)->trusted_client))
if (!G_LIKELY (GDK_X11_DISPLAY (display)->trusted_client))
return; /* Motif Dnd requires getting properties on the root window */
xev.xclient.type = ClientMessage;
......@@ -1586,7 +1586,7 @@ motif_read_initiator_info (GdkDisplay *display,
guchar *data;
MotifDragInitiatorInfo *initiator_info;
GdkX11Display *display_x11 = GDK_DISPLAY_X11 (display);
GdkX11Display *display_x11 = GDK_X11_DISPLAY (display);
gdk_x11_display_error_trap_push (display);
XGetWindowProperty (GDK_DISPLAY_XDISPLAY (display), source_window, atom,
......@@ -1650,7 +1650,7 @@ motif_drag_context_new (GdkWindow *dest_window,
GdkDragContextX11 *context_x11;
GdkDragContext *context;
GdkDisplay *display = GDK_WINDOW_DISPLAY (dest_window);
GdkX11Display *display_x11 = GDK_DISPLAY_X11 (display);
GdkX11Display *display_x11 = GDK_X11_DISPLAY (display);
/* FIXME, current_dest_drag really shouldn't be NULL'd
* if we error below.
......@@ -1716,7 +1716,7 @@ motif_top_level_enter (GdkEvent *event,
guint32 source_window,
guint32 atom)
{
GdkX11Display *display_x11 = GDK_DISPLAY_X11 (GDK_WINDOW_DISPLAY (event->any.window));
GdkX11Display *display_x11 = GDK_X11_DISPLAY (GDK_WINDOW_DISPLAY (event->any.window));
GdkDragContext *new_context;
GDK_NOTE(DND, g_message ("Motif DND top level enter: flags: %#4x time: %d source_widow: %#4x atom: %d",
......@@ -1740,7 +1740,7 @@ motif_top_level_leave (GdkEvent *event,
guint16 flags,
guint32 timestamp)
{
GdkX11Display *display_x11 = GDK_DISPLAY_X11 (GDK_WINDOW_DISPLAY (event->any.window));
GdkX11Display *display_x11 = GDK_X11_DISPLAY (GDK_WINDOW_DISPLAY (event->any.window));
GDK_NOTE(DND, g_message ("Motif DND top level leave: flags: %#4x time: %d",
flags, timestamp));
......@@ -1769,7 +1769,7 @@ motif_motion (GdkEvent *event,
gint16 y_root)
{
GdkDragContextX11 *context_x11;
GdkX11Display *display_x11 = GDK_DISPLAY_X11 (GDK_WINDOW_DISPLAY (event->any.window));
GdkX11Display *display_x11 = GDK_X11_DISPLAY (GDK_WINDOW_DISPLAY (event->any.window));
GDK_NOTE(DND, g_message ("Motif DND motion: flags: %#4x time: %d (%d, %d)",
flags, timestamp, x_root, y_root));
......@@ -1808,7 +1808,7 @@ motif_operation_changed (GdkEvent *event,
guint32 timestamp)
{
GdkDragContextX11 *context_x11;
GdkX11Display *display_x11 = GDK_DISPLAY_X11 (GDK_WINDOW_DISPLAY (event->any.window));
GdkX11Display *display_x11 = GDK_X11_DISPLAY (GDK_WINDOW_DISPLAY (event->any.window));
GDK_NOTE(DND, g_message ("Motif DND operation changed: flags: %#4x time: %d",
flags, timestamp));
......@@ -1847,7 +1847,7 @@ motif_drop_start (GdkEvent *event,
gint16 y_root)
{
GdkDragContext *new_context;
GdkX11Display *display_x11 = GDK_DISPLAY_X11 (GDK_WINDOW_DISPLAY (event->any.window));
GdkX11Display *display_x11 = GDK_X11_DISPLAY (GDK_WINDOW_DISPLAY (event->any.window));
GDK_NOTE(DND, g_message ("Motif DND drop start: flags: %#4x time: %d (%d, %d) source_widow: %#4x atom: %d",
flags, timestamp, x_root, y_root, source_window, atom));
......@@ -2732,7 +2732,7 @@ xdnd_manage_source_filter (GdkDragContext *context,
static void
base_precache_atoms (GdkDisplay *display)
{
GdkX11Display *display_x11 = GDK_DISPLAY_X11 (display);
GdkX11Display *display_x11 = GDK_X11_DISPLAY (display);
if (!display_x11->base_dnd_atoms_precached)
{
......@@ -2754,7 +2754,7 @@ base_precache_atoms (GdkDisplay *display)
static void
xdnd_precache_atoms (GdkDisplay *display)
{
GdkX11Display *display_x11 = GDK_DISPLAY_X11 (display);
GdkX11Display *display_x11 = GDK_X11_DISPLAY (display);
if (!display_x11->xdnd_atoms_precached)
{
......@@ -2814,7 +2814,7 @@ xdnd_enter_filter (GdkXEvent *xev,
version = (xevent->xclient.data.l[1] & 0xff000000) >> 24;
display = GDK_WINDOW_DISPLAY (event->any.window);
display_x11 = GDK_DISPLAY_X11 (display);
display_x11 = GDK_X11_DISPLAY (display);
xdnd_precache_atoms (display);
......@@ -2938,7 +2938,7 @@ xdnd_leave_filter (GdkXEvent *xev,
source_window));
display = GDK_WINDOW_DISPLAY (event->any.window);
display_x11 = GDK_DISPLAY_X11 (display);
display_x11 = GDK_X11_DISPLAY (display);
xdnd_precache_atoms (display);
......@@ -2985,7 +2985,7 @@ xdnd_position_filter (GdkXEvent *xev,
source_window, x_root, y_root, time, action));
display = GDK_WINDOW_DISPLAY (event->any.window);
display_x11 = GDK_DISPLAY_X11 (display);
display_x11 = GDK_X11_DISPLAY (display);
xdnd_precache_atoms (display);
......@@ -3043,7 +3043,7 @@ xdnd_drop_filter (GdkXEvent *xev,
source_window, time));
display = GDK_WINDOW_DISPLAY (event->any.window);
display_x11 = GDK_DISPLAY_X11 (display);
display_x11 = GDK_X11_DISPLAY (display);
xdnd_precache_atoms (display);
......
......@@ -272,7 +272,7 @@ _gdk_x11_display_queue_events (GdkDisplay *display)
GdkEventSource *event_source;
GdkX11Display *display_x11;
display_x11 = GDK_DISPLAY_X11 (display);
display_x11 = GDK_X11_DISPLAY (display);
event_source = (GdkEventSource *) display_x11->event_source;
while (!_gdk_event_queue_find_first (display) && XPending (xdisplay))
......@@ -353,7 +353,7 @@ gdk_x11_event_source_new (GdkDisplay *display)
event_source = (GdkEventSource *) source;
event_source->display = display;
display_x11 = GDK_DISPLAY_X11 (display);
display_x11 = GDK_X11_DISPLAY (display);
connection_number = ConnectionNumber (display_x11->xdisplay);
event_source->event_poll_fd.fd = connection_number;
......
......@@ -157,7 +157,7 @@ static void
gdk_window_queue (GdkWindow *window,
GdkWindowQueueItem *item)
{
GdkX11Display *display_x11 = GDK_DISPLAY_X11 (GDK_WINDOW_DISPLAY (window));
GdkX11Display *display_x11 = GDK_X11_DISPLAY (GDK_WINDOW_DISPLAY (window));
if (!display_x11->translate_queue)
display_x11->translate_queue = g_queue_new ();
......@@ -331,7 +331,7 @@ _gdk_x11_window_process_expose (GdkWindow *window,
GdkRectangle *area)
{
cairo_region_t *invalidate_region = cairo_region_create_rectangle (area);
GdkX11Display *display_x11 = GDK_DISPLAY_X11 (GDK_WINDOW_DISPLAY (window));
GdkX11Display *display_x11 = GDK_X11_DISPLAY (GDK_WINDOW_DISPLAY (window));
if (display_x11->translate_queue)
{
......
......@@ -99,7 +99,7 @@ struct _GdkKeymapX11
#endif
};
#define KEYMAP_USE_XKB(keymap) GDK_DISPLAY_X11 ((keymap)->display)->use_xkb
#define KEYMAP_USE_XKB(keymap) GDK_X11_DISPLAY ((keymap)->display)->use_xkb
#define KEYMAP_XDISPLAY(keymap) GDK_DISPLAY_XDISPLAY ((keymap)->display)
GType _gdk_keymap_x11_get_type (void);
......@@ -234,7 +234,7 @@ update_modmap (Display *display,
static XkbDescPtr
get_xkb (GdkKeymapX11 *keymap_x11)
{
GdkX11Display *display_x11 = GDK_DISPLAY_X11 (GDK_KEYMAP (keymap_x11)->display);
GdkX11Display *display_x11 = GDK_X11_DISPLAY (GDK_KEYMAP (keymap_x11)->display);
Display *xdisplay = display_x11->xdisplay;
update_keyrange (keymap_x11);
......@@ -318,7 +318,7 @@ set_symbol (KeySym *syms,
static void
update_keymaps (GdkKeymapX11 *keymap_x11)
{
GdkX11Display *display_x11 = GDK_DISPLAY_X11 (GDK_KEYMAP (keymap_x11)->display);
GdkX11Display *display_x11 = GDK_X11_DISPLAY (GDK_KEYMAP (keymap_x11)->display);
Display *xdisplay = display_x11->xdisplay;
#ifdef HAVE_XKB
......@@ -671,7 +671,7 @@ void
_gdk_x11_keymap_state_changed (GdkDisplay *display,
XEvent *xevent)
{
GdkX11Display *display_x11 = GDK_DISPLAY_X11 (display);
GdkX11Display *display_x11 = GDK_X11_DISPLAY (display);
XkbEvent *xkb_event = (XkbEvent *)xevent;
if (display_x11->keymap)
......@@ -691,7 +691,7 @@ _gdk_x11_keymap_state_changed (GdkDisplay *display,
void
_gdk_x11_keymap_keys_changed (GdkDisplay *display)
{
GdkX11Display *display_x11 = GDK_DISPLAY_X11 (display);
GdkX11Display *display_x11 = GDK_X11_DISPLAY (display);
++display_x11->keymap_serial;
......@@ -1595,7 +1595,7 @@ gint
_gdk_x11_get_group_for_state (GdkDisplay *display,
GdkModifierType state)
{
GdkX11Display *display_x11 = GDK_DISPLAY_X11 (display);
GdkX11Display *display_x11 = GDK_X11_DISPLAY (display);
#ifdef HAVE_XKB
if (display_x11->use_xkb)
......
......@@ -302,7 +302,7 @@ extern const gint _gdk_x11_event_mask_table_size;
#undef GDK_WINDOW_XID
#undef GDK_SCREEN_XDISPLAY
#define GDK_DISPLAY_XDISPLAY(display) (GDK_DISPLAY_X11(display)->xdisplay)
#define GDK_DISPLAY_XDISPLAY(display) (GDK_X11_DISPLAY(display)->xdisplay)
#define GDK_WINDOW_XDISPLAY(win) (GDK_SCREEN_X11 (GDK_WINDOW_SCREEN (win))->xdisplay)
#define GDK_WINDOW_XID(win) (GDK_WINDOW_IMPL_X11(GDK_WINDOW (win)->impl)->xid)
#define GDK_SCREEN_XDISPLAY(screen) (GDK_SCREEN_X11 (screen)->xdisplay)
......
......@@ -174,7 +174,7 @@ insert_atom_pair (GdkDisplay *display,
GdkAtom virtual_atom,
Atom xatom)
{
GdkX11Display *display_x11 = GDK_DISPLAY_X11 (display);
GdkX11Display *display_x11 = GDK_X11_DISPLAY (display);
if (!display_x11->atom_from_virtual)
{
......@@ -194,7 +194,7 @@ static Atom
lookup_cached_xatom (GdkDisplay *display,
GdkAtom atom)
{
GdkX11Display *display_x11 = GDK_DISPLAY_X11 (display);
GdkX11Display *display_x11 = GDK_X11_DISPLAY (display);
if (ATOM_TO_INDEX (atom) < G_N_ELEMENTS (xatoms_offset) - N_CUSTOM_PREDEFINED)
return ATOM_TO_INDEX (atom);
......@@ -339,7 +339,7 @@ gdk_x11_xatom_to_atom_for_display (GdkDisplay *display,
if (gdk_display_is_closed (display))
return GDK_NONE;
display_x11 = GDK_DISPLAY_X11 (display);
display_x11 = GDK_X11_DISPLAY (display);
if (xatom < G_N_ELEMENTS (xatoms_offset) - N_CUSTOM_PREDEFINED)
return INDEX_TO_ATOM (xatom);
......
......@@ -486,7 +486,7 @@ init_randr13 (GdkScreen *screen)
{
#ifdef HAVE_RANDR
GdkDisplay *display = gdk_screen_get_display (screen);
GdkX11Display *display_x11 = GDK_DISPLAY_X11 (display);
GdkX11Display *display_x11 = GDK_X11_DISPLAY (display);
GdkScreenX11 *screen_x11 = GDK_SCREEN_X11 (screen);
Display *dpy = GDK_SCREEN_XDISPLAY (screen);
XRRScreenResources *resources;
......@@ -790,7 +790,7 @@ _gdk_x11_screen_new (GdkDisplay *display,
{
GdkScreen *screen;
GdkScreenX11 *screen_x11;
GdkX11Display *display_x11 = GDK_DISPLAY_X11 (display);
GdkX11Display *display_x11 = GDK_X11_DISPLAY (display);
screen = g_object_new (GDK_TYPE_SCREEN_X11, NULL);
......@@ -897,7 +897,7 @@ _gdk_x11_screen_size_changed (GdkScreen *screen,
height = gdk_screen_get_height (screen);
#ifdef HAVE_RANDR
display_x11 = GDK_DISPLAY_X11 (gdk_screen_get_display (screen));
display_x11 = GDK_X11_DISPLAY (gdk_screen_get_display (screen));
if (display_x11->have_randr13 && event->type == ConfigureNotify)
{
......@@ -1300,7 +1300,7 @@ fetch_net_wm_check_window (GdkScreen *screen)
screen_x11 = GDK_SCREEN_X11 (screen);
display = screen_x11->display;
g_return_if_fail (GDK_DISPLAY_X11 (display)->trusted_client);
g_return_if_fail (GDK_X11_DISPLAY (display)->trusted_client);
g_get_current_time (&tv);
......@@ -1392,7 +1392,7 @@ gdk_x11_screen_supports_net_wm_hint (GdkScreen *screen,
screen_x11 = GDK_SCREEN_X11 (screen);
display = screen_x11->display;
if (!G_LIKELY (GDK_DISPLAY_X11 (display)->trusted_client))
if (!G_LIKELY (GDK_X11_DISPLAY (display)->trusted_client))
return FALSE;
supported_atoms = g_object_get_data (G_OBJECT (screen), "gdk-net-wm-supported-atoms");
......@@ -1610,7 +1610,7 @@ gdk_x11_screen_get_window_manager_name (GdkScreen *screen)
screen_x11 = GDK_SCREEN_X11 (screen);
display = screen_x11->display;
if (!G_LIKELY (GDK_DISPLAY_X11 (display)->trusted_client))
if (!G_LIKELY (GDK_X11_DISPLAY (display)->trusted_client))
return screen_x11->window_manager_name;
fetch_net_wm_check_window (screen);
......
......@@ -504,7 +504,7 @@ set_wm_protocols (GdkWindow *window)
protocols[n++] = gdk_x11_get_xatom_by_name_for_display (display, "_NET_WM_PING");
#ifdef HAVE_XSYNC
if (GDK_DISPLAY_X11 (display)->use_sync)
if (GDK_X11_DISPLAY (display)->use_sync)
protocols[n++] = gdk_x11_get_xatom_by_name_for_display (display, "_NET_WM_SYNC_REQUEST");
#endif
......@@ -528,7 +528,7 @@ get_default_title (void)
static void
check_leader_window_title (GdkDisplay *display)
{
GdkX11Display *display_x11 = GDK_DISPLAY_X11 (display);
GdkX11Display *display_x11 = GDK_X11_DISPLAY (display);
if (display_x11->leader_window && !display_x11->leader_window_title_set)
{
......@@ -550,7 +550,7 @@ create_focus_window (GdkDisplay *display,
Window focus_window;
xdisplay = GDK_DISPLAY_XDISPLAY (display);
display_x11 = GDK_DISPLAY_X11 (display);
display_x11 = GDK_X11_DISPLAY (display);
focus_window = XCreateSimpleWindow (xdisplay, parent,
-1, -1, 1, 1, 0,
......@@ -583,7 +583,7 @@ ensure_sync_counter (GdkWindow *window)
if (toplevel && impl->use_synchronized_configure &&
toplevel->update_counter == None &&
GDK_DISPLAY_X11 (display)->use_sync)
GDK_X11_DISPLAY (display)->use_sync)
{
Display *xdisplay = GDK_DISPLAY_XDISPLAY (display);
XSyncValue value;
......@@ -655,7 +655,7 @@ setup_toplevel_window (GdkWindow *window,
PropModeReplace,
(guchar *)&pid, 1);
leader_window = GDK_DISPLAY_X11 (screen_x11->display)->leader_window;
leader_window = GDK_X11_DISPLAY (screen_x11->display)->leader_window;
if (!leader_window)
leader_window = xid;
XChangeProperty (xdisplay, xid,
......@@ -671,8 +671,8 @@ setup_toplevel_window (GdkWindow *window,
if (!window->focus_on_map)
gdk_x11_window_set_user_time (window, 0);
else if (GDK_DISPLAY_X11 (screen_x11->display)->user_time != 0)
gdk_x11_window_set_user_time (window, GDK_DISPLAY_X11 (screen_x11->display)->user_time);
else if (GDK_X11_DISPLAY (screen_x11->display)->user_time != 0)
gdk_x11_window_set_user_time (window, GDK_X11_DISPLAY (screen_x11->display)->user_time);
ensure_sync_counter (window);
}
......@@ -701,7 +701,7 @@ _gdk_x11_display_create_window_impl (GdkDisplay *display,
unsigned int class;
const char *title;
display_x11 = GDK_DISPLAY_X11 (display);
display_x11 = GDK_X11_DISPLAY (display);
xparent = GDK_WINDOW_XID (real_parent);
screen_x11 = GDK_SCREEN_X11 (screen);
......@@ -883,7 +883,7 @@ gdk_x11_window_foreign_new_for_display (GdkDisplay *display,
g_return_val_if_fail (GDK_IS_DISPLAY (display), NULL);
display_x11 = GDK_DISPLAY_X11 (display);
display_x11 = GDK_X11_DISPLAY (display);
if ((win = gdk_x11_window_lookup_for_display (display, window)) != NULL)
return g_object_ref (win);
......@@ -1127,7 +1127,7 @@ update_wm_hints (GdkWindow *window,
wm_hints.window_group = GDK_WINDOW_XID (toplevel->group_leader);
}
else
wm_hints.window_group = GDK_DISPLAY_X11 (display)->leader_window;
wm_hints.window_group = GDK_X11_DISPLAY (display)->leader_window;
if (toplevel->urgency_hint)
wm_hints.flags |= XUrgencyHint;
......@@ -1275,7 +1275,7 @@ gdk_window_x11_show (GdkWindow *window, gboolean already_mapped)
if (WINDOW_IS_TOPLEVEL (window))
{
display = gdk_window_get_display (window);
display_x11 = GDK_DISPLAY_X11 (display);
display_x11 = GDK_X11_DISPLAY (display);
toplevel = _gdk_x11_window_get_toplevel (window);
if (toplevel->user_time != 0 &&
......@@ -2816,7 +2816,7 @@ gdk_window_x11_set_events (GdkWindow *window,
if (GDK_WINDOW_XID (window) != GDK_WINDOW_XROOTWIN (window))
xevent_mask = StructureNotifyMask | PropertyChangeMask;
display_x11 = GDK_DISPLAY_X11 (gdk_window_get_display (window));
display_x11 = GDK_X11_DISPLAY (gdk_window_get_display (window));
gdk_x11_event_source_select_events ((GdkEventSource *) display_x11->event_source,
GDK_WINDOW_XID (window), event_mask,
xevent_mask);
......@@ -3004,7 +3004,7 @@ gdk_x11_window_set_user_time (GdkWindow *window,
return;
display = gdk_window_get_display (window);
display_x11 = GDK_DISPLAY_X11 (display);
display_x11 = GDK_X11_DISPLAY (display);
toplevel = _gdk_x11_window_get_toplevel (window);
if (!toplevel)
......@@ -4470,7 +4470,7 @@ gdk_x11_window_configure_finished (GdkWindow *window)
GdkToplevelX11 *toplevel = _gdk_x11_window_get_toplevel (window);
if (toplevel && toplevel->update_counter != None &&
GDK_DISPLAY_X11 (display)->use_sync &&
GDK_X11_DISPLAY (display)->use_sync &&
!XSyncValueIsZero (toplevel->current_counter_value))
{
XSyncSetCounter (GDK_WINDOW_XDISPLAY (window),
......@@ -4491,7 +4491,7 @@ gdk_x11_window_beep (GdkWindow *window)
display = GDK_WINDOW_DISPLAY (window);
#ifdef HAVE_XKB
if (GDK_DISPLAY_X11 (display)->use_xkb)
if (GDK_X11_DISPLAY (display)->use_xkb)
{
XkbBell (GDK_DISPLAY_XDISPLAY (display),
GDK_WINDOW_XID (window),
......
......@@ -38,7 +38,7 @@
G_BEGIN_DECLS
#define GDK_IS_DISPLAY_X11(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), g_type_from_name ("GdkX11Display")))
#define GDK_IS_X11_DISPLAY(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), g_type_from_name ("GdkX11Display")))
Display *gdk_x11_display_get_xdisplay (GdkDisplay *display);
......
......@@ -53,7 +53,7 @@ _gdk_x11_display_add_window (GdkDisplay *display,
g_return_if_fail (xid != NULL);
g_return_if_fail (GDK_IS_DISPLAY (display));
display_x11 = GDK_DISPLAY_X11 (display);
display_x11 = GDK_X11_DISPLAY (display);
if (!display_x11->xid_ht)
display_x11->xid_ht = g_hash_table_new ((GHashFunc) gdk_xid_hash,
......@@ -73,7 +73,7 @@ _gdk_x11_display_remove_window (GdkDisplay *display,
g_return_if_fail (GDK_IS_DISPLAY (display));
display_x11 = GDK_DISPLAY_X11 (display);
display_x11 = GDK_X11_DISPLAY (display);
if (display_x11->xid_ht)
g_hash_table_remove (display_x11->xid_ht, &xid);
......@@ -100,7 +100,7 @@ gdk_x11_window_lookup_for_display (GdkDisplay *display,
g_return_val_if_fail (GDK_IS_DISPLAY (display), NULL);
display_x11 = GDK_DISPLAY_X11 (display);
display_x11 = GDK_X11_DISPLAY (display);
if (display_x11->xid_ht)
data = g_hash_table_lookup (display_x11->xid_ht, &window);
......
......@@ -518,7 +518,7 @@ gtk_plug_construct_for_display (GtkPlug *plug,
gpointer user_data = NULL;
#ifdef GDK_WINDOWING_X11
if (GDK_IS_DISPLAY_X11 (display))
if (GDK_IS_X11_DISPLAY (display))
priv->socket_window = gdk_x11_window_lookup_for_display (display, socket_id);
else
#endif
......@@ -543,7 +543,7 @@ gtk_plug_construct_for_display (GtkPlug *plug,
}
else
#ifdef GDK_WINDOWING_X11
if (GDK_IS_DISPLAY_X11 (display))
if (GDK_IS_X11_DISPLAY (display))
priv->socket_window = gdk_x11_window_foreign_new_for_display (display, socket_id);
#endif
......
......@@ -1320,7 +1320,7 @@ selection_set_compound_text (GtkSelectionData *selection_data,
gboolean result = FALSE;
#ifdef GDK_WINDOWING_X11
if (GDK_IS_DISPLAY_X11 (selection_data->display))
if (GDK_IS_X11_DISPLAY (selection_data->display))
{
tmp = g_strndup (str, len);
if (gdk_x11_display_utf8_to_compound_text (selection_data->display, tmp,
......@@ -2277,7 +2277,7 @@ _gtk_selection_request (GtkWidget *widget,
/* Create GdkWindow structure for the requestor */
#ifdef GDK_WINDOWING_X11
if (GDK_IS_DISPLAY_X11 (display))
if (GDK_IS_X11_DISPLAY (display))
info->requestor = gdk_x11_window_foreign_new_for_display (display, event->requestor);
else
#endif
......
......@@ -875,7 +875,7 @@ _gtk_socket_add_window (GtkSocket *socket,
GtkSocketPrivate *private = socket->priv;
#ifdef GDK_WINDOWING_X11
if (GDK_IS_DISPLAY_X11 (display))
if (GDK_IS_X11_DISPLAY (display))
private->plug_window = gdk_x11_window_lookup_for_display (display, xid);
else
#endif
......@@ -912,7 +912,7 @@ _gtk_socket_add_window (GtkSocket *socket,
if (!private->plug_window)
{
#ifdef GDK_WINDOWING_X11
if (GDK_IS_DISPLAY_X11 (display))
if (GDK_IS_X11_DISPLAY (display))
private->plug_window = gdk_x11_window_foreign_new_for_display (display, xid);
#endif
if (!private->plug_window) /* was deleted before we could get it */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment