summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdk/x11/gdkcursor-x11.c6
-rw-r--r--gdk/x11/gdkdevice-core.c4
-rw-r--r--gdk/x11/gdkdevice-xi2.c4
-rw-r--r--gdk/x11/gdkdevicemanager-core.c2
-rw-r--r--gdk/x11/gdkdisplay-x11.c120
-rw-r--r--gdk/x11/gdkdisplay-x11.h18
-rw-r--r--gdk/x11/gdkdnd-x11.c50
-rw-r--r--gdk/x11/gdkeventsource.c4
-rw-r--r--gdk/x11/gdkgeometry-x11.c4
-rw-r--r--gdk/x11/gdkkeys-x11.c12
-rw-r--r--gdk/x11/gdkprivate-x11.h2
-rw-r--r--gdk/x11/gdkproperty-x11.c6
-rw-r--r--gdk/x11/gdkscreen-x11.c12
-rw-r--r--gdk/x11/gdkwindow-x11.c30
-rw-r--r--gdk/x11/gdkx11display.h2
-rw-r--r--gdk/x11/gdkxid.c6
-rw-r--r--gtk/gtkplug.c4
-rw-r--r--gtk/gtkselection.c4
-rw-r--r--gtk/gtksocket.c4
19 files changed, 147 insertions, 147 deletions
diff --git a/gdk/x11/gdkcursor-x11.c b/gdk/x11/gdkcursor-x11.c
index 8c9bae1cf4..d9ec9329ea 100644
--- a/gdk/x11/gdkcursor-x11.c
+++ b/gdk/x11/gdkcursor-x11.c
@@ -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);
diff --git a/gdk/x11/gdkdevice-core.c b/gdk/x11/gdkdevice-core.c
index e176f91f36..224c3ed1ca 100644
--- a/gdk/x11/gdkdevice-core.c
+++ b/gdk/x11/gdkdevice-core.c
@@ -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,
diff --git a/gdk/x11/gdkdevice-xi2.c b/gdk/x11/gdkdevice-xi2.c
index 4eca8f1d29..68686ec369 100644
--- a/gdk/x11/gdkdevice-xi2.c
+++ b/gdk/x11/gdkdevice-xi2.c
@@ -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,
diff --git a/gdk/x11/gdkdevicemanager-core.c b/gdk/x11/gdkdevicemanager-core.c
index a2e2d4429a..e332cbc3c1 100644
--- a/gdk/x11/gdkdevicemanager-core.c
+++ b/gdk/x11/gdkdevicemanager-core.c
@@ -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;
diff --git a/gdk/x11/gdkdisplay-x11.c b/gdk/x11/gdkdisplay-x11.c
index 0acfb0e478..01c6aeb589 100644
--- a/gdk/x11/gdkdisplay-x11.c
+++ b/gdk/x11/gdkdisplay-x11.c
@@ -88,12 +88,12 @@ struct _GdkErrorTrap
int error_code;
};
-static void gdk_display_x11_dispose (GObject *object);
-static void gdk_display_x11_finalize (GObject *object);
+static void gdk_x11_display_dispose (GObject *object);
+static void gdk_x11_display_finalize (GObject *object);
-static void gdk_display_x11_event_translator_init (GdkEventTranslatorIface *iface);
+static void gdk_x11_display_event_translator_init (GdkEventTranslatorIface *iface);
-static gboolean gdk_display_x11_translate_event (GdkEventTranslator *translator,
+static gboolean gdk_x11_display_translate_event (GdkEventTranslator *translator,
GdkDisplay *display,
GdkEvent *event,
XEvent *xevent);
@@ -160,22 +160,22 @@ static const char *const precache_atoms[] = {
static char *gdk_sm_client_id;
-G_DEFINE_TYPE_WITH_CODE (GdkX11Display, _gdk_display_x11, GDK_TYPE_DISPLAY,
+G_DEFINE_TYPE_WITH_CODE (GdkX11Display, _gdk_x11_display, GDK_TYPE_DISPLAY,
G_IMPLEMENT_INTERFACE (GDK_TYPE_EVENT_TRANSLATOR,
- gdk_display_x11_event_translator_init))
+ gdk_x11_display_event_translator_init))
static void
-_gdk_display_x11_init (GdkX11Display *display)
+_gdk_x11_display_init (GdkX11Display *display)
{
_gdk_x11_display_manager_add_display (gdk_display_manager_get (),
GDK_DISPLAY (display));
}
static void
-gdk_display_x11_event_translator_init (GdkEventTranslatorIface *iface)
+gdk_x11_display_event_translator_init (GdkEventTranslatorIface *iface)
{
- iface->translate_event = gdk_display_x11_translate_event;
+ iface->translate_event = gdk_x11_display_translate_event;
}
static void
@@ -373,7 +373,7 @@ get_event_window (GdkEventTranslator *translator,
}
static gboolean
-gdk_display_x11_translate_event (GdkEventTranslator *translator,
+gdk_x11_display_translate_event (GdkEventTranslator *translator,
GdkDisplay *display,
GdkEvent *event,
XEvent *xevent)
@@ -383,7 +383,7 @@ gdk_display_x11_translate_event (GdkEventTranslator *translator,
GdkScreen *screen = NULL;
GdkScreenX11 *screen_x11 = NULL;
GdkToplevelX11 *toplevel = NULL;
- GdkX11Display *display_x11 = GDK_DISPLAY_X11 (display);
+ GdkX11Display *display_x11 = GDK_X11_DISPLAY (display);
gboolean return_val;
Window xwindow = None;
@@ -1077,7 +1077,7 @@ gdk_wm_protocols_filter (GdkXEvent *xev,
return GDK_FILTER_REMOVE;
}
else if (atom == gdk_x11_get_xatom_by_name_for_display (display, "_NET_WM_SYNC_REQUEST") &&
- GDK_DISPLAY_X11 (display)->use_sync)
+ GDK_X11_DISPLAY (display)->use_sync)
{
GdkToplevelX11 *toplevel = _gdk_x11_window_get_toplevel (event->any.window);
if (toplevel)
@@ -1100,7 +1100,7 @@ gdk_event_init (GdkDisplay *display)
GdkX11Display *display_x11;
GdkDeviceManager *device_manager;
- display_x11 = GDK_DISPLAY_X11 (display);
+ display_x11 = GDK_X11_DISPLAY (display);
display_x11->event_source = gdk_x11_event_source_new (display);
gdk_x11_event_source_add_translator ((GdkEventSource *) display_x11->event_source,
@@ -1124,7 +1124,7 @@ gdk_x11_display_init_input (GdkDisplay *display)
GdkDevice *device;
GList *list, *l;
- display_x11 = GDK_DISPLAY_X11 (display);
+ display_x11 = GDK_X11_DISPLAY (display);
device_manager = gdk_display_get_device_manager (display);
/* For backwards compatibility, just add
@@ -1172,7 +1172,7 @@ static void
set_sm_client_id (GdkDisplay *display,
const gchar *sm_client_id)
{
- GdkX11Display *display_x11 = GDK_DISPLAY_X11 (display);
+ GdkX11Display *display_x11 = GDK_X11_DISPLAY (display);
if (gdk_display_is_closed (display))
return;
@@ -1218,8 +1218,8 @@ _gdk_x11_display_open (const gchar *display_name)
if (!xdisplay)
return NULL;
- display = g_object_new (GDK_TYPE_DISPLAY_X11, NULL);
- display_x11 = GDK_DISPLAY_X11 (display);
+ display = g_object_new (GDK_TYPE_X11_DISPLAY, NULL);
+ display_x11 = GDK_X11_DISPLAY (display);
display_x11->xdisplay = xdisplay;
@@ -1542,28 +1542,28 @@ gdk_internal_connection_watch (Display *display,
static G_CONST_RETURN gchar *
gdk_x11_display_get_name (GdkDisplay *display)
{
- return (gchar *) DisplayString (GDK_DISPLAY_X11 (display)->xdisplay);
+ return (gchar *) DisplayString (GDK_X11_DISPLAY (display)->xdisplay);
}
static gint
gdk_x11_display_get_n_screens (GdkDisplay *display)
{
- return ScreenCount (GDK_DISPLAY_X11 (display)->xdisplay);
+ return ScreenCount (GDK_X11_DISPLAY (display)->xdisplay);
}
static GdkScreen *
gdk_x11_display_get_screen (GdkDisplay *display,
gint screen_num)
{
- g_return_val_if_fail (ScreenCount (GDK_DISPLAY_X11 (display)->xdisplay) > screen_num, NULL);
+ g_return_val_if_fail (ScreenCount (GDK_X11_DISPLAY (display)->xdisplay) > screen_num, NULL);
- return GDK_DISPLAY_X11 (display)->screens[screen_num];
+ return GDK_X11_DISPLAY (display)->screens[screen_num];
}
static GdkScreen *
gdk_x11_display_get_default_screen (GdkDisplay *display)
{
- return GDK_DISPLAY_X11 (display)->default_screen;
+ return GDK_X11_DISPLAY (display)->default_screen;
}
gboolean
@@ -1573,7 +1573,7 @@ _gdk_x11_display_is_root_window (GdkDisplay *display,
GdkX11Display *display_x11;
gint i;
- display_x11 = GDK_DISPLAY_X11 (display);
+ display_x11 = GDK_X11_DISPLAY (display);
for (i = 0; i < ScreenCount (display_x11->xdisplay); i++)
{
@@ -1661,7 +1661,7 @@ gdk_x11_display_get_default_group (GdkDisplay *display)
{
g_return_val_if_fail (GDK_IS_DISPLAY (display), NULL);
- return GDK_DISPLAY_X11 (display)->leader_gdk_window;
+ return GDK_X11_DISPLAY (display)->leader_gdk_window;
}
/**
@@ -1682,7 +1682,7 @@ gdk_x11_display_grab (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->grab_count == 0)
XGrabServer (display_x11->xdisplay);
@@ -1705,7 +1705,7 @@ gdk_x11_display_ungrab (GdkDisplay *display)
g_return_if_fail (GDK_IS_DISPLAY (display));
- display_x11 = GDK_DISPLAY_X11 (display);;
+ display_x11 = GDK_X11_DISPLAY (display);;
g_return_if_fail (display_x11->grab_count > 0);
display_x11->grab_count--;
@@ -1717,10 +1717,10 @@ gdk_x11_display_ungrab (GdkDisplay *display)
}
static void
-gdk_display_x11_dispose (GObject *object)
+gdk_x11_display_dispose (GObject *object)
{
GdkDisplay *display = GDK_DISPLAY (object);
- GdkX11Display *display_x11 = GDK_DISPLAY_X11 (object);
+ GdkX11Display *display_x11 = GDK_X11_DISPLAY (object);
gint i;
_gdk_x11_display_manager_remove_display (gdk_display_manager_get (), display);
@@ -1737,13 +1737,13 @@ gdk_display_x11_dispose (GObject *object)
display_x11->event_source = NULL;
}
- G_OBJECT_CLASS (_gdk_display_x11_parent_class)->dispose (object);
+ G_OBJECT_CLASS (_gdk_x11_display_parent_class)->dispose (object);
}
static void
-gdk_display_x11_finalize (GObject *object)
+gdk_x11_display_finalize (GObject *object)
{
- GdkX11Display *display_x11 = GDK_DISPLAY_X11 (object);
+ GdkX11Display *display_x11 = GDK_X11_DISPLAY (object);
gint i;
/* Keymap */
@@ -1810,7 +1810,7 @@ gdk_display_x11_finalize (GObject *object)
g_slice_free (GdkErrorTrap, trap);
}
- G_OBJECT_CLASS (_gdk_display_x11_parent_class)->finalize (object);
+ G_OBJECT_CLASS (_gdk_x11_display_parent_class)->finalize (object);
}
/**
@@ -1863,7 +1863,7 @@ _gdk_x11_display_screen_for_xrootwin (GdkDisplay *display,
{
gint i;
- for (i = 0; i < ScreenCount (GDK_DISPLAY_X11 (display)->xdisplay); i++)
+ for (i = 0; i < ScreenCount (GDK_X11_DISPLAY (display)->xdisplay); i++)
{
GdkScreen *screen = gdk_display_get_screen (display, i);
if (GDK_SCREEN_XROOTWIN (screen) == xrootwin)
@@ -1886,13 +1886,13 @@ Display *
gdk_x11_display_get_xdisplay (GdkDisplay *display)
{
g_return_val_if_fail (GDK_IS_DISPLAY (display), NULL);
- return GDK_DISPLAY_X11 (display)->xdisplay;
+ return GDK_X11_DISPLAY (display)->xdisplay;
}
void
_gdk_x11_display_make_default (GdkDisplay *display)
{
- GdkX11Display *display_x11 = GDK_DISPLAY_X11 (display);
+ GdkX11Display *display_x11 = GDK_X11_DISPLAY (display);
const gchar *startup_id;
g_free (display_x11->startup_notification_id);
@@ -1928,7 +1928,7 @@ broadcast_xmessage (GdkDisplay *display,
Atom type_atom_begin;
Window xwindow;
- if (!G_LIKELY (GDK_DISPLAY_X11 (display)->trusted_client))
+ if (!G_LIKELY (GDK_X11_DISPLAY (display)->trusted_client))
return;
{
@@ -2076,7 +2076,7 @@ gdk_x11_display_notify_startup_complete (GdkDisplay *display,
{
if (startup_id == NULL)
{
- startup_id = GDK_DISPLAY_X11 (display)->startup_notification_id;
+ startup_id = GDK_X11_DISPLAY (display)->startup_notification_id;
if (startup_id == NULL)
return;
}
@@ -2089,7 +2089,7 @@ gdk_x11_display_notify_startup_complete (GdkDisplay *display,
static gboolean
gdk_x11_display_supports_selection_notification (GdkDisplay *display)
{
- GdkX11Display *display_x11 = GDK_DISPLAY_X11 (display);
+ GdkX11Display *display_x11 = GDK_X11_DISPLAY (display);
return display_x11->have_xfixes;
}
@@ -2100,7 +2100,7 @@ gdk_x11_display_request_selection_notification (GdkDisplay *display,
{
#ifdef HAVE_XFIXES
- GdkX11Display *display_x11 = GDK_DISPLAY_X11 (display);
+ GdkX11Display *display_x11 = GDK_X11_DISPLAY (display);
Atom atom;
if (display_x11->have_xfixes)
@@ -2127,7 +2127,7 @@ gdk_x11_display_supports_clipboard_persistence (GdkDisplay *display)
/* It might make sense to cache this */
clipboard_manager = gdk_x11_get_xatom_by_name_for_display (display, "CLIPBOARD_MANAGER");
- return XGetSelectionOwner (GDK_DISPLAY_X11 (display)->xdisplay, clipboard_manager) != None;
+ return XGetSelectionOwner (GDK_X11_DISPLAY (display)->xdisplay, clipboard_manager) != None;
}
static void
@@ -2137,7 +2137,7 @@ gdk_x11_display_store_clipboard (GdkDisplay *display,
const GdkAtom *targets,
gint n_targets)
{
- GdkX11Display *display_x11 = GDK_DISPLAY_X11 (display);
+ GdkX11Display *display_x11 = GDK_X11_DISPLAY (display);
Atom clipboard_manager, save_targets;
g_return_if_fail (GDK_WINDOW_IS_X11 (clipboard_window));
@@ -2193,19 +2193,19 @@ gdk_x11_display_store_clipboard (GdkDisplay *display,
guint32
gdk_x11_display_get_user_time (GdkDisplay *display)
{
- return GDK_DISPLAY_X11 (display)->user_time;
+ return GDK_X11_DISPLAY (display)->user_time;
}
static gboolean
gdk_x11_display_supports_shapes (GdkDisplay *display)
{
- return GDK_DISPLAY_X11 (display)->have_shapes;
+ return GDK_X11_DISPLAY (display)->have_shapes;
}
static gboolean
gdk_x11_display_supports_input_shapes (GdkDisplay *display)
{
- return GDK_DISPLAY_X11 (display)->have_input_shapes;
+ return GDK_X11_DISPLAY (display)->have_input_shapes;
}
@@ -2222,7 +2222,7 @@ gdk_x11_display_supports_input_shapes (GdkDisplay *display)
G_CONST_RETURN gchar *
gdk_x11_display_get_startup_notification_id (GdkDisplay *display)
{
- return GDK_DISPLAY_X11 (display)->startup_notification_id;
+ return GDK_X11_DISPLAY (display)->startup_notification_id;
}
/**
@@ -2254,7 +2254,7 @@ gdk_x11_display_set_startup_notification_id (GdkDisplay *display,
GdkX11Display *display_x11;
gchar *time_str;
- display_x11 = GDK_DISPLAY_X11 (display);
+ display_x11 = GDK_X11_DISPLAY (display);
g_free (display_x11->startup_notification_id);
display_x11->startup_notification_id = g_strdup (startup_id);
@@ -2291,7 +2291,7 @@ gdk_x11_display_set_startup_notification_id (GdkDisplay *display,
static gboolean
gdk_x11_display_supports_composite (GdkDisplay *display)
{
- GdkX11Display *x11_display = GDK_DISPLAY_X11 (display);
+ GdkX11Display *x11_display = GDK_X11_DISPLAY (display);
return x11_display->have_xcomposite &&
x11_display->have_xdamage &&
@@ -2303,7 +2303,7 @@ gdk_x11_display_list_devices (GdkDisplay *display)
{
g_return_val_if_fail (GDK_IS_DISPLAY (display), NULL);
- return GDK_DISPLAY_X11 (display)->input_devices;
+ return GDK_X11_DISPLAY (display)->input_devices;
}
static gboolean
@@ -2340,8 +2340,8 @@ gdk_x11_display_add_client_message_filter (GdkDisplay *display,
filter->function = func;
filter->data = data;
- GDK_DISPLAY_X11(display)->client_filters =
- g_list_append (GDK_DISPLAY_X11 (display)->client_filters,
+ GDK_X11_DISPLAY(display)->client_filters =
+ g_list_append (GDK_X11_DISPLAY (display)->client_filters,
filter);
}
@@ -2374,7 +2374,7 @@ gdk_x11_register_standard_event_type (GdkDisplay *display,
GdkEventTypeX11 *event_type;
GdkX11Display *display_x11;
- display_x11 = GDK_DISPLAY_X11 (display);
+ display_x11 = GDK_X11_DISPLAY (display);
event_type = g_new (GdkEventTypeX11, 1);
event_type->base = event_base;
@@ -2395,7 +2395,7 @@ _gdk_x11_display_error_event (GdkDisplay *display,
GSList *tmp_list;
gboolean ignore;
- display_x11 = GDK_DISPLAY_X11 (display);
+ display_x11 = GDK_X11_DISPLAY (display);
ignore = FALSE;
for (tmp_list = display_x11->error_traps;
@@ -2500,7 +2500,7 @@ gdk_x11_display_error_trap_push (GdkDisplay *display)
GdkX11Display *display_x11;
GdkErrorTrap *trap;
- display_x11 = GDK_DISPLAY_X11 (display);
+ display_x11 = GDK_X11_DISPLAY (display);
delete_outdated_error_traps (display_x11);
@@ -2525,7 +2525,7 @@ gdk_x11_display_error_trap_pop_internal (GdkDisplay *display,
GSList *tmp_list;
int result;
- display_x11 = GDK_DISPLAY_X11 (display);
+ display_x11 = GDK_X11_DISPLAY (display);
g_return_val_if_fail (display_x11->error_traps != NULL, Success);
@@ -2607,7 +2607,7 @@ gdk_x11_display_error_trap_pop_internal (GdkDisplay *display,
gint
gdk_x11_display_error_trap_pop (GdkDisplay *display)
{
- g_return_val_if_fail (GDK_IS_DISPLAY_X11 (display), Success);
+ g_return_val_if_fail (GDK_IS_X11_DISPLAY (display), Success);
return gdk_x11_display_error_trap_pop_internal (display, TRUE);
}
@@ -2629,7 +2629,7 @@ gdk_x11_display_error_trap_pop (GdkDisplay *display)
void
gdk_x11_display_error_trap_pop_ignored (GdkDisplay *display)
{
- g_return_if_fail (GDK_IS_DISPLAY_X11 (display));
+ g_return_if_fail (GDK_IS_X11_DISPLAY (display));
gdk_x11_display_error_trap_pop_internal (display, FALSE);
}
@@ -2703,7 +2703,7 @@ gdk_x11_display_get_keymap (GdkDisplay *display)
{
GdkX11Display *display_x11;
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->keymap)
display_x11->keymap = g_object_new (_gdk_keymap_x11_get_type (), NULL);
@@ -2714,13 +2714,13 @@ gdk_x11_display_get_keymap (GdkDisplay *display)
}
static void
-_gdk_display_x11_class_init (GdkX11DisplayClass * class)
+_gdk_x11_display_class_init (GdkX11DisplayClass * class)
{
GObjectClass *object_class = G_OBJECT_CLASS (class);
GdkDisplayClass *display_class = GDK_DISPLAY_CLASS (class);
- object_class->dispose = gdk_display_x11_dispose;
- object_class->finalize = gdk_display_x11_finalize;
+ object_class->dispose = gdk_x11_display_dispose;
+ object_class->finalize = gdk_x11_display_finalize;
display_class->get_name = gdk_x11_display_get_name;
display_class->get_n_screens = gdk_x11_display_get_n_screens;
diff --git a/gdk/x11/gdkdisplay-x11.h b/gdk/x11/gdkdisplay-x11.h
index d805564469..0075fd1b76 100644
--- a/gdk/x11/gdkdisplay-x11.h
+++ b/gdk/x11/gdkdisplay-x11.h
@@ -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__ */
diff --git a/gdk/x11/gdkdnd-x11.c b/gdk/x11/gdkdnd-x11.c
index b52444bd23..168c82c801 100644
--- a/gdk/x11/gdkdnd-x11.c
+++ b/gdk/x11/gdkdnd-x11.c
@@ -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);
diff --git a/gdk/x11/gdkeventsource.c b/gdk/x11/gdkeventsource.c
index 213486568c..892e68662a 100644
--- a/gdk/x11/gdkeventsource.c
+++ b/gdk/x11/gdkeventsource.c
@@ -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;
diff --git a/gdk/x11/gdkgeometry-x11.c b/gdk/x11/gdkgeometry-x11.c
index d55007dae5..8bbf123062 100644
--- a/gdk/x11/gdkgeometry-x11.c
+++ b/gdk/x11/gdkgeometry-x11.c
@@ -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)
{
diff --git a/gdk/x11/gdkkeys-x11.c b/gdk/x11/gdkkeys-x11.c
index dbe88fde37..84b02d4f1c 100644
--- a/gdk/x11/gdkkeys-x11.c
+++ b/gdk/x11/gdkkeys-x11.c
@@ -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)
diff --git a/gdk/x11/gdkprivate-x11.h b/gdk/x11/gdkprivate-x11.h
index edc191e0f5..da2a3c13b0 100644
--- a/gdk/x11/gdkprivate-x11.h
+++ b/gdk/x11/gdkprivate-x11.h
@@ -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)
diff --git a/gdk/x11/gdkproperty-x11.c b/gdk/x11/gdkproperty-x11.c
index 6be1717815..e8ddecd992 100644
--- a/gdk/x11/gdkproperty-x11.c
+++ b/gdk/x11/gdkproperty-x11.c
@@ -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);
diff --git a/gdk/x11/gdkscreen-x11.c b/gdk/x11/gdkscreen-x11.c
index 2a4bc8fcf6..b086ee9f8e 100644
--- a/gdk/x11/gdkscreen-x11.c
+++ b/gdk/x11/gdkscreen-x11.c
@@ -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);
diff --git a/gdk/x11/gdkwindow-x11.c b/gdk/x11/gdkwindow-x11.c
index 44551335b4..1fce606d83 100644
--- a/gdk/x11/gdkwindow-x11.c
+++ b/gdk/x11/gdkwindow-x11.c
@@ -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),
diff --git a/gdk/x11/gdkx11display.h b/gdk/x11/gdkx11display.h
index 887e5e8266..111f303b7d 100644
--- a/gdk/x11/gdkx11display.h
+++ b/gdk/x11/gdkx11display.h
@@ -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);
diff --git a/gdk/x11/gdkxid.c b/gdk/x11/gdkxid.c
index 9f2f275c19..cb6639cb9e 100644
--- a/gdk/x11/gdkxid.c
+++ b/gdk/x11/gdkxid.c
@@ -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);
diff --git a/gtk/gtkplug.c b/gtk/gtkplug.c
index 4c0e8258bb..9cf7ff4de5 100644
--- a/gtk/gtkplug.c
+++ b/gtk/gtkplug.c
@@ -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
diff --git a/gtk/gtkselection.c b/gtk/gtkselection.c
index eebd8d609f..5ee7b2541d 100644
--- a/gtk/gtkselection.c
+++ b/gtk/gtkselection.c
@@ -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
diff --git a/gtk/gtksocket.c b/gtk/gtksocket.c
index c362b64a2d..c3cf1911ce 100644
--- a/gtk/gtksocket.c
+++ b/gtk/gtksocket.c
@@ -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 */