Commit e724054d authored by Benjamin Otte's avatar Benjamin Otte
Browse files

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.
parent 18a6976e
...@@ -975,7 +975,6 @@ GDK_SCREEN_XNUMBER ...@@ -975,7 +975,6 @@ GDK_SCREEN_XNUMBER
GDK_SCREEN_XSCREEN GDK_SCREEN_XSCREEN
GDK_CURSOR_XCURSOR GDK_CURSOR_XCURSOR
GDK_CURSOR_XDISPLAY GDK_CURSOR_XDISPLAY
GDK_WINDOW_XWINDOW
gdkx_visual_get gdkx_visual_get
gdk_window_foreign_new gdk_window_foreign_new
gdk_window_foreign_new_for_display gdk_window_foreign_new_for_display
......
...@@ -1035,6 +1035,6 @@ gdk_display_get_maximal_cursor_size (GdkDisplay *display, ...@@ -1035,6 +1035,6 @@ gdk_display_get_maximal_cursor_size (GdkDisplay *display,
screen = gdk_display_get_default_screen (display); screen = gdk_display_get_default_screen (display);
window = gdk_screen_get_root_window (screen); window = gdk_screen_get_root_window (screen);
XQueryBestCursor (GDK_DISPLAY_XDISPLAY (display), XQueryBestCursor (GDK_DISPLAY_XDISPLAY (display),
GDK_WINDOW_XWINDOW (window), GDK_WINDOW_XID (window),
128, 128, width, height); 128, 128, width, height);
} }
...@@ -228,7 +228,7 @@ gdk_device_core_warp (GdkDevice *device, ...@@ -228,7 +228,7 @@ gdk_device_core_warp (GdkDevice *device,
Window dest; Window dest;
xdisplay = GDK_DISPLAY_XDISPLAY (gdk_device_get_display (device)); 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); XWarpPointer (xdisplay, None, dest, 0, 0, 0, 0, x, y);
} }
...@@ -497,6 +497,6 @@ gdk_device_core_select_window_events (GdkDevice *device, ...@@ -497,6 +497,6 @@ gdk_device_core_select_window_events (GdkDevice *device,
xmask |= StructureNotifyMask | PropertyChangeMask; xmask |= StructureNotifyMask | PropertyChangeMask;
XSelectInput (GDK_WINDOW_XDISPLAY (window), XSelectInput (GDK_WINDOW_XDISPLAY (window),
GDK_WINDOW_XWINDOW (window), GDK_WINDOW_XID (window),
xmask); xmask);
} }
...@@ -443,7 +443,7 @@ gdk_device_xi_grab (GdkDevice *device, ...@@ -443,7 +443,7 @@ gdk_device_xi_grab (GdkDevice *device,
status = XGrabDevice (GDK_WINDOW_XDISPLAY (window), status = XGrabDevice (GDK_WINDOW_XDISPLAY (window),
device_xi->xdevice, device_xi->xdevice,
GDK_WINDOW_XWINDOW (window), GDK_WINDOW_XID (window),
owner_events, owner_events,
num_classes, event_classes, num_classes, event_classes,
GrabModeAsync, GrabModeAsync, GrabModeAsync, GrabModeAsync,
...@@ -492,7 +492,7 @@ gdk_device_xi_select_window_events (GdkDevice *device, ...@@ -492,7 +492,7 @@ gdk_device_xi_select_window_events (GdkDevice *device,
find_events (device, event_mask, event_classes, &num_classes); find_events (device, event_mask, event_classes, &num_classes);
XSelectExtensionEvent (GDK_WINDOW_XDISPLAY (window), XSelectExtensionEvent (GDK_WINDOW_XDISPLAY (window),
GDK_WINDOW_XWINDOW (window), GDK_WINDOW_XID (window),
event_classes, num_classes); event_classes, num_classes);
if (event_mask) if (event_mask)
......
...@@ -258,13 +258,13 @@ gdk_device_xi2_set_window_cursor (GdkDevice *device, ...@@ -258,13 +258,13 @@ gdk_device_xi2_set_window_cursor (GdkDevice *device,
XIDefineCursor (GDK_WINDOW_XDISPLAY (window), XIDefineCursor (GDK_WINDOW_XDISPLAY (window),
priv->device_id, priv->device_id,
GDK_WINDOW_XWINDOW (window), GDK_WINDOW_XID (window),
cursor_private->xcursor); cursor_private->xcursor);
} }
else else
XIUndefineCursor (GDK_WINDOW_XDISPLAY (window), XIUndefineCursor (GDK_WINDOW_XDISPLAY (window),
priv->device_id, priv->device_id,
GDK_WINDOW_XWINDOW (window)); GDK_WINDOW_XID (window));
} }
static void static void
...@@ -277,7 +277,7 @@ gdk_device_xi2_warp (GdkDevice *device, ...@@ -277,7 +277,7 @@ gdk_device_xi2_warp (GdkDevice *device,
Window dest; Window dest;
priv = GDK_DEVICE_XI2 (device)->priv; 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), XIWarpPointer (GDK_SCREEN_XDISPLAY (screen),
priv->device_id, priv->device_id,
...@@ -512,7 +512,7 @@ gdk_device_xi2_select_window_events (GdkDevice *device, ...@@ -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); evmask.mask = gdk_device_xi2_translate_event_mask (event_mask, &evmask.mask_len);
XISelectEvents (GDK_WINDOW_XDISPLAY (window), XISelectEvents (GDK_WINDOW_XDISPLAY (window),
GDK_WINDOW_XWINDOW (window), GDK_WINDOW_XID (window),
&evmask, 1); &evmask, 1);
g_free (evmask.mask); g_free (evmask.mask);
......
...@@ -369,7 +369,7 @@ gdk_device_manager_xi2_constructed (GObject *object) ...@@ -369,7 +369,7 @@ gdk_device_manager_xi2_constructed (GObject *object)
event_mask.mask = mask; event_mask.mask = mask;
_gdk_device_manager_xi2_select_events (GDK_DEVICE_MANAGER (object), _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); &event_mask);
} }
......
...@@ -547,7 +547,7 @@ gdk_window_cache_new (GdkScreen *screen) ...@@ -547,7 +547,7 @@ gdk_window_cache_new (GdkScreen *screen)
result->child_hash = g_hash_table_new (g_direct_hash, NULL); result->child_hash = g_hash_table_new (g_direct_hash, NULL);
result->screen = screen; 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; 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_DISPLAY_X11 (GDK_SCREEN_X11 (screen)->display)->trusted_client))
...@@ -568,13 +568,13 @@ gdk_window_cache_new (GdkScreen *screen) ...@@ -568,13 +568,13 @@ gdk_window_cache_new (GdkScreen *screen)
return result; return result;
} }
XSelectInput (xdisplay, GDK_WINDOW_XWINDOW (root_window), XSelectInput (xdisplay, GDK_WINDOW_XID (root_window),
result->old_event_mask | SubstructureNotifyMask); result->old_event_mask | SubstructureNotifyMask);
gdk_window_add_filter (root_window, gdk_window_cache_filter, result); gdk_window_add_filter (root_window, gdk_window_cache_filter, result);
gdk_window_add_filter (NULL, gdk_window_cache_shape_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), if (!_gdk_x11_get_window_child_info (gdk_screen_get_display (screen),
GDK_WINDOW_XWINDOW (root_window), GDK_WINDOW_XID (root_window),
FALSE, NULL, FALSE, NULL,
&children, &nchildren)) &children, &nchildren))
return result; return result;
...@@ -598,9 +598,9 @@ gdk_window_cache_new (GdkScreen *screen) ...@@ -598,9 +598,9 @@ gdk_window_cache_new (GdkScreen *screen)
*/ */
if (gdk_screen_is_composited (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); 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 #endif
...@@ -613,7 +613,7 @@ gdk_window_cache_destroy (GdkWindowCache *cache) ...@@ -613,7 +613,7 @@ gdk_window_cache_destroy (GdkWindowCache *cache)
GdkWindow *root_window = gdk_screen_get_root_window (cache->screen); GdkWindow *root_window = gdk_screen_get_root_window (cache->screen);
XSelectInput (GDK_WINDOW_XDISPLAY (root_window), XSelectInput (GDK_WINDOW_XDISPLAY (root_window),
GDK_WINDOW_XWINDOW (root_window), GDK_WINDOW_XID (root_window),
cache->old_event_mask); cache->old_event_mask);
gdk_window_remove_filter (root_window, gdk_window_cache_filter, cache); gdk_window_remove_filter (root_window, gdk_window_cache_filter, cache);
gdk_window_remove_filter (NULL, gdk_window_cache_shape_filter, cache); gdk_window_remove_filter (NULL, gdk_window_cache_shape_filter, cache);
...@@ -774,7 +774,7 @@ get_client_window_at_coords (GdkWindowCache *cache, ...@@ -774,7 +774,7 @@ get_client_window_at_coords (GdkWindowCache *cache,
if (retval) if (retval)
return retval; return retval;
else 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, ...@@ -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)) if (_gdk_x11_display_is_root_window (display, xwindow))
event_mask = ButtonPressMask; event_mask = ButtonPressMask;
......
...@@ -703,7 +703,7 @@ gdk_property_get (GdkWindow *window, ...@@ -703,7 +703,7 @@ gdk_property_get (GdkWindow *window,
} }
res = XGetWindowProperty (GDK_DISPLAY_XDISPLAY (display), res = XGetWindowProperty (GDK_DISPLAY_XDISPLAY (display),
GDK_WINDOW_XWINDOW (window), xproperty, GDK_WINDOW_XID (window), xproperty,
offset, get_length, pdelete, offset, get_length, pdelete,
xtype, &ret_prop_type, &ret_format, xtype, &ret_prop_type, &ret_format,
&ret_nitems, &ret_bytes_after, &ret_nitems, &ret_bytes_after,
...@@ -892,7 +892,7 @@ gdk_property_delete (GdkWindow *window, ...@@ -892,7 +892,7 @@ gdk_property_delete (GdkWindow *window,
if (GDK_WINDOW_DESTROYED (window)) if (GDK_WINDOW_DESTROYED (window))
return; 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), gdk_x11_atom_to_xatom_for_display (GDK_WINDOW_DISPLAY (window),
property)); property));
} }
...@@ -878,7 +878,7 @@ _gdk_window_impl_new (GdkWindow *window, ...@@ -878,7 +878,7 @@ _gdk_window_impl_new (GdkWindow *window,
gdk_window_set_type_hint (window, attributes->type_hint); gdk_window_set_type_hint (window, attributes->type_hint);
gdk_event_source_select_events ((GdkEventSource *) display_x11->event_source, gdk_event_source_select_events ((GdkEventSource *) display_x11->event_source,
GDK_WINDOW_XWINDOW (window), event_mask, GDK_WINDOW_XID (window), event_mask,
StructureNotifyMask | PropertyChangeMask); StructureNotifyMask | PropertyChangeMask);
} }
...@@ -1826,7 +1826,7 @@ move_to_current_desktop (GdkWindow *window) ...@@ -1826,7 +1826,7 @@ move_to_current_desktop (GdkWindow *window)
xclient.type = ClientMessage; xclient.type = ClientMessage;
xclient.serial = 0; xclient.serial = 0;
xclient.send_event = True; 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.message_type = gdk_x11_get_xatom_by_name_for_display (display, "_NET_WM_DESKTOP");
xclient.format = 32; xclient.format = 32;
...@@ -1877,7 +1877,7 @@ gdk_window_focus (GdkWindow *window, ...@@ -1877,7 +1877,7 @@ gdk_window_focus (GdkWindow *window,
memset (&xclient, 0, sizeof (xclient)); memset (&xclient, 0, sizeof (xclient));
xclient.type = ClientMessage; 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, xclient.message_type = gdk_x11_get_xatom_by_name_for_display (display,
"_NET_ACTIVE_WINDOW"); "_NET_ACTIVE_WINDOW");
xclient.format = 32; xclient.format = 32;
...@@ -3305,7 +3305,7 @@ _gdk_windowing_window_at_device_position (GdkDisplay *display, ...@@ -3305,7 +3305,7 @@ _gdk_windowing_window_at_device_position (GdkDisplay *display,
toplevels = gdk_screen_get_toplevel_windows (screen); toplevels = gdk_screen_get_toplevel_windows (screen);
for (list = toplevels; list != NULL; list = g_list_next (list)) { for (list = toplevels; list != NULL; list = g_list_next (list)) {
window = GDK_WINDOW (list->data); window = GDK_WINDOW (list->data);
xwindow = GDK_WINDOW_XWINDOW (window); xwindow = GDK_WINDOW_XID (window);
gdk_error_trap_push (); gdk_error_trap_push ();
XQueryPointer (xdisplay, xwindow, XQueryPointer (xdisplay, xwindow,
&root, &child, &rootx, &rooty, &winx, &winy, &xmask); &root, &child, &rootx, &rooty, &winx, &winy, &xmask);
...@@ -3407,7 +3407,7 @@ gdk_window_x11_set_events (GdkWindow *window, ...@@ -3407,7 +3407,7 @@ gdk_window_x11_set_events (GdkWindow *window,
display_x11 = GDK_DISPLAY_X11 (gdk_window_get_display (window)); display_x11 = GDK_DISPLAY_X11 (gdk_window_get_display (window));
gdk_event_source_select_events ((GdkEventSource *) display_x11->event_source, gdk_event_source_select_events ((GdkEventSource *) display_x11->event_source,
GDK_WINDOW_XWINDOW (window), event_mask, GDK_WINDOW_XID (window), event_mask,
xevent_mask); xevent_mask);
} }
} }
...@@ -3986,7 +3986,7 @@ gdk_window_iconify (GdkWindow *window) ...@@ -3986,7 +3986,7 @@ gdk_window_iconify (GdkWindow *window)
if (GDK_WINDOW_IS_MAPPED (window)) if (GDK_WINDOW_IS_MAPPED (window))
{ {
XIconifyWindow (GDK_WINDOW_XDISPLAY (window), XIconifyWindow (GDK_WINDOW_XDISPLAY (window),
GDK_WINDOW_XWINDOW (window), GDK_WINDOW_XID (window),
gdk_screen_get_number (GDK_WINDOW_SCREEN (window))); gdk_screen_get_number (GDK_WINDOW_SCREEN (window)));
} }
else else
...@@ -4067,7 +4067,7 @@ gdk_window_stick (GdkWindow *window) ...@@ -4067,7 +4067,7 @@ gdk_window_stick (GdkWindow *window)
/* Request desktop 0xFFFFFFFF */ /* Request desktop 0xFFFFFFFF */
memset (&xclient, 0, sizeof (xclient)); memset (&xclient, 0, sizeof (xclient));
xclient.type = ClientMessage; xclient.type = ClientMessage;
xclient.window = GDK_WINDOW_XWINDOW (window); xclient.window = GDK_WINDOW_XID (window);
xclient.display = GDK_WINDOW_XDISPLAY (window); xclient.display = GDK_WINDOW_XDISPLAY (window);
xclient.message_type = gdk_x11_get_xatom_by_name_for_display (GDK_WINDOW_DISPLAY (window), xclient.message_type = gdk_x11_get_xatom_by_name_for_display (GDK_WINDOW_DISPLAY (window),
"_NET_WM_DESKTOP"); "_NET_WM_DESKTOP");
...@@ -5541,7 +5541,7 @@ _gdk_windowing_window_set_composited (GdkWindow *window, ...@@ -5541,7 +5541,7 @@ _gdk_windowing_window_set_composited (GdkWindow *window,
display = gdk_window_get_display (window); display = gdk_window_get_display (window);
dpy = GDK_DISPLAY_XDISPLAY (display); dpy = GDK_DISPLAY_XDISPLAY (display);
xid = GDK_WINDOW_XWINDOW (private); xid = GDK_WINDOW_XID (private);
if (composited) if (composited)
{ {
...@@ -5642,7 +5642,7 @@ gdk_x11_get_server_time (GdkWindow *window) ...@@ -5642,7 +5642,7 @@ gdk_x11_get_server_time (GdkWindow *window)
g_return_val_if_fail (!GDK_WINDOW_DESTROYED (window), 0); g_return_val_if_fail (!GDK_WINDOW_DESTROYED (window), 0);
xdisplay = GDK_WINDOW_XDISPLAY (window); xdisplay = GDK_WINDOW_XDISPLAY (window);
xwindow = GDK_WINDOW_XWINDOW (window); xwindow = GDK_WINDOW_XID (window);
timestamp_prop_atom = timestamp_prop_atom =
gdk_x11_get_xatom_by_name_for_display (GDK_WINDOW_DISPLAY (window), gdk_x11_get_xatom_by_name_for_display (GDK_WINDOW_DISPLAY (window),
"GDK_TIMESTAMP_PROP"); "GDK_TIMESTAMP_PROP");
......
...@@ -118,7 +118,6 @@ gint gdk_x11_get_default_screen (void); ...@@ -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_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_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) #define GDK_SCREEN_XDISPLAY(screen) (GDK_SCREEN_X11 (screen)->xdisplay)
...@@ -159,11 +158,11 @@ gint gdk_x11_get_default_screen (void); ...@@ -159,11 +158,11 @@ gint gdk_x11_get_default_screen (void);
#define GDK_WINDOW_XID(win) (gdk_x11_window_get_xid (win)) #define GDK_WINDOW_XID(win) (gdk_x11_window_get_xid (win))
/** /**
* GDK_WINDOW_XWINDOW: * GDK_WINDOW_XID:
* *
* Another name for GDK_DRAWABLE_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_XDISPLAY(screen) (gdk_x11_display_get_xdisplay (gdk_screen_get_display (screen)))
#define GDK_SCREEN_XSCREEN(screen) (gdk_x11_screen_get_xscreen (screen)) #define GDK_SCREEN_XSCREEN(screen) (gdk_x11_screen_get_xscreen (screen))
......
...@@ -57,7 +57,7 @@ static void xembed_set_info (GdkWindow *window, ...@@ -57,7 +57,7 @@ static void xembed_set_info (GdkWindow *window,
GdkNativeWindow GdkNativeWindow
_gtk_plug_windowing_get_id (GtkPlug *plug) _gtk_plug_windowing_get_id (GtkPlug *plug)
{ {
return GDK_WINDOW_XWINDOW (gtk_widget_get_window (GTK_WIDGET (plug))); return GDK_WINDOW_XID (gtk_widget_get_window (GTK_WIDGET (plug)));
} }
void void
...@@ -146,7 +146,7 @@ xembed_set_info (GdkWindow *window, ...@@ -146,7 +146,7 @@ xembed_set_info (GdkWindow *window,
buffer[1] = flags; buffer[1] = flags;
XChangeProperty (GDK_DISPLAY_XDISPLAY (display), XChangeProperty (GDK_DISPLAY_XDISPLAY (display),
GDK_WINDOW_XWINDOW (window), GDK_WINDOW_XID (window),
xembed_info_atom, xembed_info_atom, 32, xembed_info_atom, xembed_info_atom, 32,
PropModeReplace, PropModeReplace,
(unsigned char *)buffer, 2); (unsigned char *)buffer, 2);
...@@ -280,7 +280,7 @@ _gtk_plug_windowing_filter_func (GdkXEvent *gdk_xevent, ...@@ -280,7 +280,7 @@ _gtk_plug_windowing_filter_func (GdkXEvent *gdk_xevent,
* Probably need check in _gtk_plug_add_to_socket * Probably need check in _gtk_plug_add_to_socket
*/ */
if (xre->parent != GDK_WINDOW_XWINDOW (priv->socket_window)) if (xre->parent != GDK_WINDOW_XID (priv->socket_window))
{ {
GtkWidget *widget = GTK_WIDGET (plug); GtkWidget *widget = GTK_WIDGET (plug);
...@@ -297,7 +297,7 @@ _gtk_plug_windowing_filter_func (GdkXEvent *gdk_xevent, ...@@ -297,7 +297,7 @@ _gtk_plug_windowing_filter_func (GdkXEvent *gdk_xevent,
* be invisible to the app. * be invisible to the app.
*/ */
if (xre->parent == GDK_WINDOW_XWINDOW (gdk_screen_get_root_window (screen))) if (xre->parent == GDK_WINDOW_XID (gdk_screen_get_root_window (screen)))
{ {
GTK_NOTE (PLUGSOCKET, g_message ("GtkPlug: calling gtk_plug_send_delete_event()")); GTK_NOTE (PLUGSOCKET, g_message ("GtkPlug: calling gtk_plug_send_delete_event()"));
_gtk_plug_send_delete_event (widget); _gtk_plug_send_delete_event (widget);
...@@ -309,7 +309,7 @@ _gtk_plug_windowing_filter_func (GdkXEvent *gdk_xevent, ...@@ -309,7 +309,7 @@ _gtk_plug_windowing_filter_func (GdkXEvent *gdk_xevent,
goto done; goto done;
} }
if (xre->parent != GDK_WINDOW_XWINDOW (gdk_screen_get_root_window (screen))) if (xre->parent != GDK_WINDOW_XID (gdk_screen_get_root_window (screen)))
{ {
/* Start of embedding protocol */ /* Start of embedding protocol */
......
...@@ -2567,7 +2567,7 @@ _gtk_selection_incr_event (GdkWindow *window, ...@@ -2567,7 +2567,7 @@ _gtk_selection_incr_event (GdkWindow *window,
#ifdef DEBUG_SELECTION #ifdef DEBUG_SELECTION
g_message ("INCR: put %d bytes (offset = %d) into window 0x%lx , property %ld", g_message ("INCR: put %d bytes (offset = %d) into window 0x%lx , property %ld",
num_bytes, info->conversions[i].offset, num_bytes, info->conversions[i].offset,
GDK_WINDOW_XWINDOW(info->requestor), event->atom); GDK_WINDOW_XID(info->requestor), event->atom);
#endif #endif
bytes_per_item = gtk_selection_bytes_per_item (info->conversions[i].data.format); bytes_per_item = gtk_selection_bytes_per_item (info->conversions[i].data.format);
......
...@@ -57,7 +57,7 @@ static gboolean xembed_get_info (GdkWindow *gdk_window, ...@@ -57,7 +57,7 @@ static gboolean xembed_get_info (GdkWindow *gdk_window,
GdkNativeWindow GdkNativeWindow
_gtk_socket_windowing_get_id (GtkSocket *socket) _gtk_socket_windowing_get_id (GtkSocket *socket)
{ {
return GDK_WINDOW_XWINDOW (gtk_widget_get_window (GTK_WIDGET (socket))); return GDK_WINDOW_XID (gtk_widget_get_window (GTK_WIDGET (socket)));
} }
void void
...@@ -69,7 +69,7 @@ _gtk_socket_windowing_realize_window (GtkSocket *socket) ...@@ -69,7 +69,7 @@ _gtk_socket_windowing_realize_window (GtkSocket *socket)
window = gtk_widget_get_window (GTK_WIDGET (socket)); window = gtk_widget_get_window (GTK_WIDGET (socket));
XGetWindowAttributes (GDK_WINDOW_XDISPLAY (window), XGetWindowAttributes (GDK_WINDOW_XDISPLAY (window),
GDK_WINDOW_XWINDOW (window), GDK_WINDOW_XID (window),
&xattrs); &xattrs);
/* Sooooo, it turns out that mozilla, as per the gtk2xt code selects /* Sooooo, it turns out that mozilla, as per the gtk2xt code selects
...@@ -81,7 +81,7 @@ _gtk_socket_windowing_realize_window (GtkSocket *socket) ...@@ -81,7 +81,7 @@ _gtk_socket_windowing_realize_window (GtkSocket *socket)
this for GtkSocket, so we unselect it here, fixing the crashes in this for GtkSocket, so we unselect it here, fixing the crashes in
firefox. */ firefox. */
XSelectInput (GDK_WINDOW_XDISPLAY (window), XSelectInput (GDK_WINDOW_XDISPLAY (window),
GDK_WINDOW_XWINDOW (window), GDK_WINDOW_XID (window),
(xattrs.your_event_mask & ~ButtonPressMask) | (xattrs.your_event_mask & ~ButtonPressMask) |
SubstructureNotifyMask | SubstructureRedirectMask); SubstructureNotifyMask | SubstructureRedirectMask);
} }
...@@ -90,7 +90,7 @@ void ...@@ -90,7 +90,7 @@ void
_gtk_socket_windowing_end_embedding_toplevel (GtkSocket *socket) _gtk_socket_windowing_end_embedding_toplevel (GtkSocket *socket)
{ {
gtk_window_remove_embedded_xid (GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (socket))), gtk_window_remove_embedded_xid (GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (socket))),
GDK_WINDOW_XWINDOW (socket->plug_window)); GDK_WINDOW_XID (socket->plug_window));
} }
void void
...@@ -105,7 +105,7 @@ _gtk_socket_windowing_size_request (GtkSocket *socket) ...@@ -105,7 +105,7 @@ _gtk_socket_windowing_size_request (GtkSocket *socket)
socket->request_height = 1; socket->request_height = 1;
if (XGetWMNormalHints (GDK_WINDOW_XDISPLAY (socket->plug_window), if (XGetWMNormalHints (GDK_WINDOW_XDISPLAY (socket->plug_window),
GDK_WINDOW_XWINDOW (socket->plug_window), GDK_WINDOW_XID (socket->plug_window),
&hints, &supplied)) &hints, &supplied))
{ {
if (hints.flags & PMinSize) if (hints.flags & PMinSize)
...@@ -134,8 +134,8 @@ _gtk_socket_windowing_send_key_event (GtkSocket *socket, ...@@ -134,8 +134,8 @@ _gtk_socket_windowing_send_key_event (GtkSocket *socket,
memset (&xkey, 0, sizeof (xkey)); memset (&xkey, 0, sizeof (xkey));
xkey.type = (gdk_event->type == GDK_KEY_PRESS) ? KeyPress : KeyRelease; xkey.type = (gdk_event->type == GDK_KEY_PRESS) ? KeyPress : KeyRelease;
xkey.window = GDK_WINDOW_XWINDOW (socket->plug_window); xkey.window = GDK_WINDOW_XID (socket->plug_window);
xkey.root = GDK_WINDOW_XWINDOW (gdk_screen_get_root_window (screen)); xkey.root = GDK_WINDOW_XID (gdk_screen_get_root_window (screen));
xkey.subwindow = None; xkey.subwindow = None;
xkey.time = gdk_event->key.time; xkey.time = gdk_event->key.time;
xkey.x = 0; xkey.x = 0;
...@@ -148,7 +148,7 @@ _gtk_socket_windowing_send_key_event (GtkSocket *socket, ...@@ -148,7 +148,7 @@ _gtk_socket_windowing_send_key_event (GtkSocket *socket,
gdk_error_trap_push (); gdk_error_trap_push ();
XSendEvent (GDK_WINDOW_XDISPLAY (socket->plug_window), XSendEvent (GDK_WINDOW_XDISPLAY (socket->plug_window),
GDK_WINDOW_XWINDOW (socket->plug_window), GDK_WINDOW_XID (socket->plug_window),
False, False,
(mask_key_presses ? KeyPressMask : NoEventMask), (mask_key_presses ? KeyPressMask : NoEventMask),
(XEvent *)&xkey); (XEvent *)&xkey);
...@@ -220,8 +220,8 @@ _gtk_socket_windowing_send_configure_event (GtkSocket *socket) ...@@ -220,8 +220,8 @@ _gtk_socket_windowing_send_configure_event (GtkSocket *socket)
memset (&xconfigure, 0, sizeof (xconfigure)); memset (&xconfigure, 0, sizeof (xconfigure));
xconfigure.type = ConfigureNotify; xconfigure.type = ConfigureNotify;
xconfigure.event = GDK_WINDOW_XWINDOW (socket->plug_window); xconfigure.event = GDK_WINDOW_XID (socket->plug_window);
xconfigure.window = GDK_WINDOW_XWINDOW (socket->plug_window); xconfigure.window = GDK_WINDOW_XID (socket->plug_window);
/* The ICCCM says that synthetic events should have root relative /* The ICCCM says that synthetic events should have root relative
* coordinates. We still aren't really ICCCM compliant, since * coordinates. We still aren't really ICCCM compliant, since
...@@ -243,7 +243,7 @@ _gtk_socket_windowing_send_configure_event (GtkSocket *socket) ...@@ -243,7 +243,7 @@ _gtk_socket_windowing_send_configure_event (GtkSocket *socket)