From c546ad9720c060c2f47cb224855d19e82688bcec Mon Sep 17 00:00:00 2001 From: "Owen W. Taylor" Date: Wed, 22 Dec 2010 16:26:08 -0500 Subject: [PATCH] Fix for gdk/x11 changes Handle the move of gdk_window_lookup() and gdk_window_foreign_new() into the gdk_x11_ namespace. --- src/shell-global.c | 3 ++- src/shell-tray-manager.c | 9 ++++++--- src/st/st-im-text.c | 5 +++-- src/tray/na-tray-manager.c | 1 - 4 files changed, 11 insertions(+), 7 deletions(-) diff --git a/src/shell-global.c b/src/shell-global.c index 71eb72895..2cf6ec689 100644 --- a/src/shell-global.c +++ b/src/shell-global.c @@ -530,7 +530,8 @@ shell_global_set_cursor (ShellGlobal *global, { ClutterStage *stage = CLUTTER_STAGE (meta_plugin_get_stage (global->plugin)); - global->stage_window = gdk_window_foreign_new (clutter_x11_get_stage_window (stage)); + global->stage_window = gdk_x11_window_foreign_new_for_display (gdk_display_get_default (), + clutter_x11_get_stage_window (stage)); } gdk_window_set_cursor (global->stage_window, cursor); diff --git a/src/shell-tray-manager.c b/src/shell-tray-manager.c index ec6c8aeee..370297ffa 100644 --- a/src/shell-tray-manager.c +++ b/src/shell-tray-manager.c @@ -198,6 +198,7 @@ shell_tray_manager_manage_stage (ShellTrayManager *manager, { Window stage_xwindow; GdkWindow *stage_window; + GdkDisplay *display; GdkScreen *screen; g_return_if_fail (manager->priv->stage == NULL); @@ -212,13 +213,15 @@ shell_tray_manager_manage_stage (ShellTrayManager *manager, * in in some way. (The Clutter/Mutter combo is currently incapable * of multi-screen operation, so alternatively we could just assume * that clutter_x11_get_default_screen() gives us the right - * screen.) + * screen.) We assume, in any case, that we are using the default + * GDK display. */ - stage_window = gdk_window_lookup (stage_xwindow); + display = gdk_display_get_default(); + stage_window = gdk_x11_window_lookup_for_display (display, stage_xwindow); if (stage_window) g_object_ref (stage_window); else - stage_window = gdk_window_foreign_new (stage_xwindow); + stage_window = gdk_x11_window_foreign_new_for_display (display, stage_xwindow); screen = gdk_window_get_screen (stage_window); diff --git a/src/st/st-im-text.c b/src/st/st-im-text.c index 2b3f0fd21..c2a0bf55a 100644 --- a/src/st/st-im-text.c +++ b/src/st/st-im-text.c @@ -61,6 +61,7 @@ #include #include #include +#include #include #include "st-im-text.h" @@ -200,11 +201,11 @@ window_for_actor (ClutterActor *actor) stage = clutter_actor_get_stage (actor); xwindow = clutter_x11_get_stage_window ((ClutterStage *)stage); - window = gdk_window_lookup_for_display (display, xwindow); + window = gdk_x11_window_lookup_for_display (display, xwindow); if (window) g_object_ref (window); else - window = gdk_window_foreign_new_for_display (display, xwindow); + window = gdk_x11_window_foreign_new_for_display (display, xwindow); return window; } diff --git a/src/tray/na-tray-manager.c b/src/tray/na-tray-manager.c index 64300bc82..d53c90206 100644 --- a/src/tray/na-tray-manager.c +++ b/src/tray/na-tray-manager.c @@ -27,7 +27,6 @@ #include "na-tray-manager.h" #include "gtk-compat.h" -#include #include #if defined (GDK_WINDOWING_X11) #include