diff options
author | Benjamin Otte <otte@redhat.com> | 2010-10-06 00:08:25 +0200 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2010-12-02 20:17:27 +0100 |
commit | cf51750bf4b370a180b6273bd99781956165769d (patch) | |
tree | 6074e6d1442a95368077295cedab53ac22c4e49c /gdk/x11/gdkdrawable-x11.c | |
parent | 86390c99dd885dd729e3634ab7aa78646cc4e230 (diff) | |
download | gtk+-cf51750bf4b370a180b6273bd99781956165769d.tar.gz |
API: x11: gdk_drawable_get_xid => gdk_window_get_xid
Also moves the function implementations to gtkwindow-x11.c.
Diffstat (limited to 'gdk/x11/gdkdrawable-x11.c')
-rw-r--r-- | gdk/x11/gdkdrawable-x11.c | 46 |
1 files changed, 0 insertions, 46 deletions
diff --git a/gdk/x11/gdkdrawable-x11.c b/gdk/x11/gdkdrawable-x11.c index a35a54b40e..9d00d02e80 100644 --- a/gdk/x11/gdkdrawable-x11.c +++ b/gdk/x11/gdkdrawable-x11.c @@ -134,52 +134,6 @@ gdk_x11_drawable_get_xdisplay (GdkDrawable *drawable) return GDK_SCREEN_XDISPLAY (GDK_DRAWABLE_IMPL_X11 (get_impl_drawable (drawable))->screen); } -/** - * gdk_x11_drawable_get_xid: - * @drawable: a #GdkDrawable. - * - * Returns the X resource (window) belonging to a #GdkDrawable. - * - * Return value: the ID of @drawable's X resource. - **/ -XID -gdk_x11_drawable_get_xid (GdkDrawable *drawable) -{ - GdkDrawable *impl; - - if (GDK_IS_WINDOW (drawable)) - { - GdkWindow *window = (GdkWindow *)drawable; - - /* Try to ensure the window has a native window */ - if (!_gdk_window_has_impl (window)) - { - gdk_window_ensure_native (window); - - /* We sync here to ensure the window is created in the Xserver when - * this function returns. This is required because the returned XID - * for this window must be valid immediately, even with another - * connection to the Xserver */ - gdk_display_sync (gdk_window_get_display (window)); - } - - if (!GDK_WINDOW_IS_X11 (window)) - { - g_warning (G_STRLOC " drawable is not a native X11 window"); - return None; - } - - impl = ((GdkWindowObject *)drawable)->impl; - } - else - { - g_warning (G_STRLOC " drawable is not a window"); - return None; - } - - return ((GdkDrawableImplX11 *)impl)->xid; -} - GdkDrawable * gdk_x11_window_get_drawable_impl (GdkWindow *window) { |