From dc7d8dae6722a1219b5fde4fc03fdcc051ec4e1c Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Wed, 6 Oct 2010 01:54:00 +0200 Subject: [PATCH] x11: Change GDK_WINDOW_SCREEN macro on't look at GdkDrawableImplX11->screen, but call gdk_window_get_screen() instead. --- gdk/x11/gdkgeometry-x11.c | 2 +- gdk/x11/gdkprivate-x11.h | 2 +- gdk/x11/gdkwindow-x11.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/gdk/x11/gdkgeometry-x11.c b/gdk/x11/gdkgeometry-x11.c index a4b706273f..f7e967f50e 100644 --- a/gdk/x11/gdkgeometry-x11.c +++ b/gdk/x11/gdkgeometry-x11.c @@ -308,7 +308,7 @@ _gdk_x11_window_translate (GdkWindow *window, item->u.translate.dy = dy; gdk_window_queue (window, item); - XCopyArea (GDK_WINDOW_XDISPLAY (impl), + XCopyArea (GDK_WINDOW_XDISPLAY ((GdkWindow *) impl), GDK_DRAWABLE_IMPL_X11 (private->impl)->xid, GDK_DRAWABLE_IMPL_X11 (impl->impl)->xid, xgc, diff --git a/gdk/x11/gdkprivate-x11.h b/gdk/x11/gdkprivate-x11.h index bfcf1e38f8..f4135424e0 100644 --- a/gdk/x11/gdkprivate-x11.h +++ b/gdk/x11/gdkprivate-x11.h @@ -153,7 +153,7 @@ extern gboolean _gdk_synchronize; #define GDK_DRAWABLE_XROOTWIN(win) (GDK_WINDOW_XROOTWIN (win)) #define GDK_SCREEN_DISPLAY(screen) (GDK_SCREEN_X11 (screen)->display) #define GDK_SCREEN_XROOTWIN(screen) (GDK_SCREEN_X11 (screen)->xroot_window) -#define GDK_WINDOW_SCREEN(win) (GDK_DRAWABLE_IMPL_X11 (((GdkWindowObject *)win)->impl)->screen) +#define GDK_WINDOW_SCREEN(win) (gdk_window_get_screen (win)) #define GDK_WINDOW_DISPLAY(win) (GDK_SCREEN_X11 (GDK_WINDOW_SCREEN (win))->display) #define GDK_WINDOW_XROOTWIN(win) (GDK_SCREEN_X11 (GDK_WINDOW_SCREEN (win))->xroot_window) #define GDK_GC_DISPLAY(gc) (GDK_SCREEN_DISPLAY (GDK_GC_X11(gc)->screen)) diff --git a/gdk/x11/gdkwindow-x11.c b/gdk/x11/gdkwindow-x11.c index ef5c1c8180..11c8837a90 100644 --- a/gdk/x11/gdkwindow-x11.c +++ b/gdk/x11/gdkwindow-x11.c @@ -194,7 +194,7 @@ gdk_window_impl_x11_finalize (GObject *object) if (!GDK_WINDOW_DESTROYED (wrapper)) { - GdkDisplay *display = GDK_WINDOW_DISPLAY (wrapper); + GdkDisplay *display = GDK_WINDOW_DISPLAY ((GdkWindow *) wrapper); _gdk_xid_table_remove (display, draw_impl->xid); if (window_impl->toplevel && window_impl->toplevel->focus_window)