summaryrefslogtreecommitdiff
path: root/gdk
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2010-11-22 17:06:46 +0100
committerBenjamin Otte <otte@redhat.com>2010-12-02 20:20:56 +0100
commite724054d19d617107cfc4d9be116b376bfee249d (patch)
treeb50c60ed0ac5952ebf8d6e45255e1f396d5a419d /gdk
parent18a6976e5a1e899b62280fbbeb6df9c2c9191bcc (diff)
downloadgtk+-e724054d19d617107cfc4d9be116b376bfee249d.tar.gz
API: Remove GDK_WINDOW_XWINDOW() macro
Use GDK_WINDOW_XID() instead. THis was done using sed, so there might be issues resulting to that. Feel free to fix.
Diffstat (limited to 'gdk')
-rw-r--r--gdk/x11/gdkcursor-x11.c2
-rw-r--r--gdk/x11/gdkdevice-core.c4
-rw-r--r--gdk/x11/gdkdevice-xi.c4
-rw-r--r--gdk/x11/gdkdevice-xi2.c8
-rw-r--r--gdk/x11/gdkdevicemanager-xi2.c2
-rw-r--r--gdk/x11/gdkdnd-x11.c16
-rw-r--r--gdk/x11/gdkproperty-x11.c4
-rw-r--r--gdk/x11/gdkwindow-x11.c18
-rw-r--r--gdk/x11/gdkx.h5
9 files changed, 31 insertions, 32 deletions
diff --git a/gdk/x11/gdkcursor-x11.c b/gdk/x11/gdkcursor-x11.c
index 60380672c2..6169cc1d89 100644
--- a/gdk/x11/gdkcursor-x11.c
+++ b/gdk/x11/gdkcursor-x11.c
@@ -1035,6 +1035,6 @@ gdk_display_get_maximal_cursor_size (GdkDisplay *display,
screen = gdk_display_get_default_screen (display);
window = gdk_screen_get_root_window (screen);
XQueryBestCursor (GDK_DISPLAY_XDISPLAY (display),
- GDK_WINDOW_XWINDOW (window),
+ GDK_WINDOW_XID (window),
128, 128, width, height);
}
diff --git a/gdk/x11/gdkdevice-core.c b/gdk/x11/gdkdevice-core.c
index a674aac654..acb438641f 100644
--- a/gdk/x11/gdkdevice-core.c
+++ b/gdk/x11/gdkdevice-core.c
@@ -228,7 +228,7 @@ gdk_device_core_warp (GdkDevice *device,
Window dest;
xdisplay = GDK_DISPLAY_XDISPLAY (gdk_device_get_display (device));
- dest = GDK_WINDOW_XWINDOW (gdk_screen_get_root_window (screen));
+ dest = GDK_WINDOW_XID (gdk_screen_get_root_window (screen));
XWarpPointer (xdisplay, None, dest, 0, 0, 0, 0, x, y);
}
@@ -497,6 +497,6 @@ gdk_device_core_select_window_events (GdkDevice *device,
xmask |= StructureNotifyMask | PropertyChangeMask;
XSelectInput (GDK_WINDOW_XDISPLAY (window),
- GDK_WINDOW_XWINDOW (window),
+ GDK_WINDOW_XID (window),
xmask);
}
diff --git a/gdk/x11/gdkdevice-xi.c b/gdk/x11/gdkdevice-xi.c
index 8bebf075d3..8ffd8dfa06 100644
--- a/gdk/x11/gdkdevice-xi.c
+++ b/gdk/x11/gdkdevice-xi.c
@@ -443,7 +443,7 @@ gdk_device_xi_grab (GdkDevice *device,
status = XGrabDevice (GDK_WINDOW_XDISPLAY (window),
device_xi->xdevice,
- GDK_WINDOW_XWINDOW (window),
+ GDK_WINDOW_XID (window),
owner_events,
num_classes, event_classes,
GrabModeAsync, GrabModeAsync,
@@ -492,7 +492,7 @@ gdk_device_xi_select_window_events (GdkDevice *device,
find_events (device, event_mask, event_classes, &num_classes);
XSelectExtensionEvent (GDK_WINDOW_XDISPLAY (window),
- GDK_WINDOW_XWINDOW (window),
+ GDK_WINDOW_XID (window),
event_classes, num_classes);
if (event_mask)
diff --git a/gdk/x11/gdkdevice-xi2.c b/gdk/x11/gdkdevice-xi2.c
index 41142e2097..7c91cd3f82 100644
--- a/gdk/x11/gdkdevice-xi2.c
+++ b/gdk/x11/gdkdevice-xi2.c
@@ -258,13 +258,13 @@ gdk_device_xi2_set_window_cursor (GdkDevice *device,
XIDefineCursor (GDK_WINDOW_XDISPLAY (window),
priv->device_id,
- GDK_WINDOW_XWINDOW (window),
+ GDK_WINDOW_XID (window),
cursor_private->xcursor);
}
else
XIUndefineCursor (GDK_WINDOW_XDISPLAY (window),
priv->device_id,
- GDK_WINDOW_XWINDOW (window));
+ GDK_WINDOW_XID (window));
}
static void
@@ -277,7 +277,7 @@ gdk_device_xi2_warp (GdkDevice *device,
Window dest;
priv = GDK_DEVICE_XI2 (device)->priv;
- dest = GDK_WINDOW_XWINDOW (gdk_screen_get_root_window (screen));
+ dest = GDK_WINDOW_XID (gdk_screen_get_root_window (screen));
XIWarpPointer (GDK_SCREEN_XDISPLAY (screen),
priv->device_id,
@@ -512,7 +512,7 @@ gdk_device_xi2_select_window_events (GdkDevice *device,
evmask.mask = gdk_device_xi2_translate_event_mask (event_mask, &evmask.mask_len);
XISelectEvents (GDK_WINDOW_XDISPLAY (window),
- GDK_WINDOW_XWINDOW (window),
+ GDK_WINDOW_XID (window),
&evmask, 1);
g_free (evmask.mask);
diff --git a/gdk/x11/gdkdevicemanager-xi2.c b/gdk/x11/gdkdevicemanager-xi2.c
index f97717d522..25d7a841a6 100644
--- a/gdk/x11/gdkdevicemanager-xi2.c
+++ b/gdk/x11/gdkdevicemanager-xi2.c
@@ -369,7 +369,7 @@ gdk_device_manager_xi2_constructed (GObject *object)
event_mask.mask = mask;
_gdk_device_manager_xi2_select_events (GDK_DEVICE_MANAGER (object),
- GDK_WINDOW_XWINDOW (gdk_screen_get_root_window (screen)),
+ GDK_WINDOW_XID (gdk_screen_get_root_window (screen)),
&event_mask);
}
diff --git a/gdk/x11/gdkdnd-x11.c b/gdk/x11/gdkdnd-x11.c
index 8927d5ef81..0c94a6456b 100644
--- a/gdk/x11/gdkdnd-x11.c
+++ b/gdk/x11/gdkdnd-x11.c
@@ -547,7 +547,7 @@ gdk_window_cache_new (GdkScreen *screen)
result->child_hash = g_hash_table_new (g_direct_hash, NULL);
result->screen = screen;
- XGetWindowAttributes (xdisplay, GDK_WINDOW_XWINDOW (root_window), &xwa);
+ 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))
@@ -568,13 +568,13 @@ gdk_window_cache_new (GdkScreen *screen)
return result;
}
- XSelectInput (xdisplay, GDK_WINDOW_XWINDOW (root_window),
+ XSelectInput (xdisplay, GDK_WINDOW_XID (root_window),
result->old_event_mask | SubstructureNotifyMask);
gdk_window_add_filter (root_window, gdk_window_cache_filter, result);
gdk_window_add_filter (NULL, gdk_window_cache_shape_filter, result);
if (!_gdk_x11_get_window_child_info (gdk_screen_get_display (screen),
- GDK_WINDOW_XWINDOW (root_window),
+ GDK_WINDOW_XID (root_window),
FALSE, NULL,
&children, &nchildren))
return result;
@@ -598,9 +598,9 @@ gdk_window_cache_new (GdkScreen *screen)
*/
if (gdk_screen_is_composited (screen))
{
- cow = XCompositeGetOverlayWindow (xdisplay, GDK_WINDOW_XWINDOW (root_window));
+ cow = XCompositeGetOverlayWindow (xdisplay, GDK_WINDOW_XID (root_window));
gdk_window_cache_add (result, cow, 0, 0, gdk_screen_get_width (screen), gdk_screen_get_height (screen), TRUE);
- XCompositeReleaseOverlayWindow (xdisplay, GDK_WINDOW_XWINDOW (root_window));
+ XCompositeReleaseOverlayWindow (xdisplay, GDK_WINDOW_XID (root_window));
}
#endif
@@ -613,7 +613,7 @@ gdk_window_cache_destroy (GdkWindowCache *cache)
GdkWindow *root_window = gdk_screen_get_root_window (cache->screen);
XSelectInput (GDK_WINDOW_XDISPLAY (root_window),
- GDK_WINDOW_XWINDOW (root_window),
+ GDK_WINDOW_XID (root_window),
cache->old_event_mask);
gdk_window_remove_filter (root_window, gdk_window_cache_filter, cache);
gdk_window_remove_filter (NULL, gdk_window_cache_shape_filter, cache);
@@ -774,7 +774,7 @@ get_client_window_at_coords (GdkWindowCache *cache,
if (retval)
return retval;
else
- return GDK_WINDOW_XWINDOW (gdk_screen_get_root_window (cache->screen));
+ return GDK_WINDOW_XID (gdk_screen_get_root_window (cache->screen));
}
/*************************************************************
@@ -2397,7 +2397,7 @@ xdnd_send_xevent (GdkDragContext *context,
}
}
- xwindow = GDK_WINDOW_XWINDOW (window);
+ xwindow = GDK_WINDOW_XID (window);
if (_gdk_x11_display_is_root_window (display, xwindow))
event_mask = ButtonPressMask;
diff --git a/gdk/x11/gdkproperty-x11.c b/gdk/x11/gdkproperty-x11.c
index b55cd42e5f..00132b29e1 100644
--- a/gdk/x11/gdkproperty-x11.c
+++ b/gdk/x11/gdkproperty-x11.c
@@ -703,7 +703,7 @@ gdk_property_get (GdkWindow *window,
}
res = XGetWindowProperty (GDK_DISPLAY_XDISPLAY (display),
- GDK_WINDOW_XWINDOW (window), xproperty,
+ GDK_WINDOW_XID (window), xproperty,
offset, get_length, pdelete,
xtype, &ret_prop_type, &ret_format,
&ret_nitems, &ret_bytes_after,
@@ -892,7 +892,7 @@ gdk_property_delete (GdkWindow *window,
if (GDK_WINDOW_DESTROYED (window))
return;
- XDeleteProperty (GDK_WINDOW_XDISPLAY (window), GDK_WINDOW_XWINDOW (window),
+ XDeleteProperty (GDK_WINDOW_XDISPLAY (window), GDK_WINDOW_XID (window),
gdk_x11_atom_to_xatom_for_display (GDK_WINDOW_DISPLAY (window),
property));
}
diff --git a/gdk/x11/gdkwindow-x11.c b/gdk/x11/gdkwindow-x11.c
index 2589fa6c54..e2cfcb8c02 100644
--- a/gdk/x11/gdkwindow-x11.c
+++ b/gdk/x11/gdkwindow-x11.c
@@ -878,7 +878,7 @@ _gdk_window_impl_new (GdkWindow *window,
gdk_window_set_type_hint (window, attributes->type_hint);
gdk_event_source_select_events ((GdkEventSource *) display_x11->event_source,
- GDK_WINDOW_XWINDOW (window), event_mask,
+ GDK_WINDOW_XID (window), event_mask,
StructureNotifyMask | PropertyChangeMask);
}
@@ -1826,7 +1826,7 @@ move_to_current_desktop (GdkWindow *window)
xclient.type = ClientMessage;
xclient.serial = 0;
xclient.send_event = True;
- xclient.window = GDK_WINDOW_XWINDOW (window);
+ xclient.window = GDK_WINDOW_XID (window);
xclient.message_type = gdk_x11_get_xatom_by_name_for_display (display, "_NET_WM_DESKTOP");
xclient.format = 32;
@@ -1877,7 +1877,7 @@ gdk_window_focus (GdkWindow *window,
memset (&xclient, 0, sizeof (xclient));
xclient.type = ClientMessage;
- xclient.window = GDK_WINDOW_XWINDOW (window);
+ xclient.window = GDK_WINDOW_XID (window);
xclient.message_type = gdk_x11_get_xatom_by_name_for_display (display,
"_NET_ACTIVE_WINDOW");
xclient.format = 32;
@@ -3305,7 +3305,7 @@ _gdk_windowing_window_at_device_position (GdkDisplay *display,
toplevels = gdk_screen_get_toplevel_windows (screen);
for (list = toplevels; list != NULL; list = g_list_next (list)) {
window = GDK_WINDOW (list->data);
- xwindow = GDK_WINDOW_XWINDOW (window);
+ xwindow = GDK_WINDOW_XID (window);
gdk_error_trap_push ();
XQueryPointer (xdisplay, xwindow,
&root, &child, &rootx, &rooty, &winx, &winy, &xmask);
@@ -3407,7 +3407,7 @@ gdk_window_x11_set_events (GdkWindow *window,
display_x11 = GDK_DISPLAY_X11 (gdk_window_get_display (window));
gdk_event_source_select_events ((GdkEventSource *) display_x11->event_source,
- GDK_WINDOW_XWINDOW (window), event_mask,
+ GDK_WINDOW_XID (window), event_mask,
xevent_mask);
}
}
@@ -3986,7 +3986,7 @@ gdk_window_iconify (GdkWindow *window)
if (GDK_WINDOW_IS_MAPPED (window))
{
XIconifyWindow (GDK_WINDOW_XDISPLAY (window),
- GDK_WINDOW_XWINDOW (window),
+ GDK_WINDOW_XID (window),
gdk_screen_get_number (GDK_WINDOW_SCREEN (window)));
}
else
@@ -4067,7 +4067,7 @@ gdk_window_stick (GdkWindow *window)
/* Request desktop 0xFFFFFFFF */
memset (&xclient, 0, sizeof (xclient));
xclient.type = ClientMessage;
- xclient.window = GDK_WINDOW_XWINDOW (window);
+ xclient.window = GDK_WINDOW_XID (window);
xclient.display = GDK_WINDOW_XDISPLAY (window);
xclient.message_type = gdk_x11_get_xatom_by_name_for_display (GDK_WINDOW_DISPLAY (window),
"_NET_WM_DESKTOP");
@@ -5541,7 +5541,7 @@ _gdk_windowing_window_set_composited (GdkWindow *window,
display = gdk_window_get_display (window);
dpy = GDK_DISPLAY_XDISPLAY (display);
- xid = GDK_WINDOW_XWINDOW (private);
+ xid = GDK_WINDOW_XID (private);
if (composited)
{
@@ -5642,7 +5642,7 @@ gdk_x11_get_server_time (GdkWindow *window)
g_return_val_if_fail (!GDK_WINDOW_DESTROYED (window), 0);
xdisplay = GDK_WINDOW_XDISPLAY (window);
- xwindow = GDK_WINDOW_XWINDOW (window);
+ xwindow = GDK_WINDOW_XID (window);
timestamp_prop_atom =
gdk_x11_get_xatom_by_name_for_display (GDK_WINDOW_DISPLAY (window),
"GDK_TIMESTAMP_PROP");
diff --git a/gdk/x11/gdkx.h b/gdk/x11/gdkx.h
index 0a6178ee24..911f93bf97 100644
--- a/gdk/x11/gdkx.h
+++ b/gdk/x11/gdkx.h
@@ -118,7 +118,6 @@ gint gdk_x11_get_default_screen (void);
*/
#define GDK_WINDOW_XDISPLAY(win) (GDK_SCREEN_X11 (GDK_WINDOW_SCREEN (win))->xdisplay)
#define GDK_WINDOW_XID(win) (GDK_WINDOW_IMPL_X11(((GdkWindowObject *)win)->impl)->xid)
-#define GDK_WINDOW_XWINDOW(win) (GDK_WINDOW_IMPL_X11(((GdkWindowObject *)win)->impl)->xid)
#define GDK_SCREEN_XDISPLAY(screen) (GDK_SCREEN_X11 (screen)->xdisplay)
@@ -159,11 +158,11 @@ gint gdk_x11_get_default_screen (void);
#define GDK_WINDOW_XID(win) (gdk_x11_window_get_xid (win))
/**
- * GDK_WINDOW_XWINDOW:
+ * GDK_WINDOW_XID:
*
* Another name for GDK_DRAWABLE_XID().
*/
-#define GDK_WINDOW_XWINDOW(win) (gdk_x11_window_get_xid (win))
+#define GDK_WINDOW_XID(win) (gdk_x11_window_get_xid (win))
#define GDK_SCREEN_XDISPLAY(screen) (gdk_x11_display_get_xdisplay (gdk_screen_get_display (screen)))
#define GDK_SCREEN_XSCREEN(screen) (gdk_x11_screen_get_xscreen (screen))