diff options
author | Matthias Clasen <mclasen@redhat.com> | 2019-02-23 16:52:51 -0500 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2019-02-23 22:01:58 -0500 |
commit | b8d7777cc487c8877679894b825504fde179ae27 (patch) | |
tree | 08acb200f3a1c759d77875e752e5721a00479a97 | |
parent | c4edc285429764b6534b197bf36363ec3c8fe71e (diff) | |
download | gtk+-kill-register-surface2.tar.gz |
xim: Stop using gdk_surface_get_user_datakill-register-surface2
Use gtk_root_get_for_surface instead.
-rw-r--r-- | gtk/gtkimcontextxim.c | 22 |
1 files changed, 2 insertions, 20 deletions
diff --git a/gtk/gtkimcontextxim.c b/gtk/gtkimcontextxim.c index c93fcc34b2..aec739337c 100644 --- a/gtk/gtkimcontextxim.c +++ b/gtk/gtkimcontextxim.c @@ -22,6 +22,7 @@ #include "gtkimcontextxim.h" #include "gtkimmoduleprivate.h" +#include "gtkroot.h" #include "gtk/gtkintl.h" @@ -1526,32 +1527,13 @@ on_client_widget_hierarchy_changed (GtkWidget *widget, update_in_toplevel (context_xim); } -/* Finds the GtkWidget that owns the window, or if none, the - * widget owning the nearest parent that has a widget. - */ -static GtkWidget * -widget_for_window (GdkSurface *window) -{ - while (window) - { - gpointer user_data; - gdk_surface_get_user_data (window, &user_data); - if (user_data) - return user_data; - - window = gdk_surface_get_parent (window); - } - - return NULL; -} - /* Called when context_xim->client_surface changes; takes care of * removing and/or setting up our watches for the toplevel */ static void update_client_widget (GtkIMContextXIM *context_xim) { - GtkWidget *new_client_widget = widget_for_window (context_xim->client_surface); + GtkWidget *new_client_widget = gtk_root_get_for_surface (context_xim->client_surface); if (new_client_widget != context_xim->client_widget) { |