From 8994e621f720ca1897d86596564dc8e9316b052d Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Thu, 2 Dec 2010 15:51:36 +0100 Subject: [PATCH] Replace some GDK X11 calls with future-proof ones GTK is about to clean up its code and remove duplicate macros and GdkDrawable usage. To prepare for that landing, we use the future-safe versions of the same calls. https://bugzilla.gnome.org/show_bug.cgi?id=636302 --- src/tools/mutter-window-demo.c | 4 ++-- src/ui/menu.c | 4 ++-- src/ui/tile-preview.c | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/tools/mutter-window-demo.c b/src/tools/mutter-window-demo.c index 5e8c5cab3..2b8991ee3 100644 --- a/src/tools/mutter-window-demo.c +++ b/src/tools/mutter-window-demo.c @@ -51,7 +51,7 @@ set_gdk_window_struts (GdkWindow *window, vals[11] = 800; XChangeProperty (GDK_WINDOW_XDISPLAY (window), - GDK_WINDOW_XWINDOW (window), + GDK_WINDOW_XID (window), XInternAtom (GDK_WINDOW_XDISPLAY (window), "_NET_WM_STRUT_PARTIAL", False), XA_CARDINAL, 32, PropModeReplace, @@ -125,7 +125,7 @@ set_gdk_window_type (GdkWindow *window, type, False); XChangeProperty (GDK_WINDOW_XDISPLAY (window), - GDK_WINDOW_XWINDOW (window), + GDK_WINDOW_XID (window), XInternAtom (GDK_WINDOW_XDISPLAY (window), "_NET_WM_WINDOW_TYPE", False), XA_ATOM, 32, PropModeReplace, (guchar *)atoms, diff --git a/src/ui/menu.c b/src/ui/menu.c index 02f14d862..18324cb39 100644 --- a/src/ui/menu.c +++ b/src/ui/menu.c @@ -401,10 +401,10 @@ meta_window_menu_new (MetaFrames *frames, n_workspaces, active_workspace); window = gtk_widget_get_window (GTK_WIDGET (frames)); - display = gdk_x11_drawable_get_xdisplay (window); + display = GDK_WINDOW_XDISPLAY (window); screen = gdk_window_get_screen (window); - xroot = GDK_DRAWABLE_XID (gdk_screen_get_root_window (screen)); + xroot = GDK_WINDOW_XID (gdk_screen_get_root_window (screen)); submenu = gtk_menu_new (); diff --git a/src/ui/tile-preview.c b/src/ui/tile-preview.c index 214e1fa49..3a0bbbd8d 100644 --- a/src/ui/tile-preview.c +++ b/src/ui/tile-preview.c @@ -195,7 +195,7 @@ meta_tile_preview_show (MetaTilePreview *preview, gtk_widget_show (preview->preview_window); window = gtk_widget_get_window (preview->preview_window); meta_core_lower_beneath_focus_window (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), - GDK_WINDOW_XWINDOW (window), + GDK_WINDOW_XID (window), gtk_get_current_event_time ()); old_rect.x = old_rect.y = 0; @@ -254,5 +254,5 @@ meta_tile_preview_get_xwindow (MetaTilePreview *preview, if (create_serial) *create_serial = preview->create_serial; - return GDK_WINDOW_XWINDOW (window); + return GDK_WINDOW_XID (window); }