[gtk/present-toplevel-2] more win32 build fixes



commit 4740d49c0cedf23342764edc97b35cae82996532
Author: Matthias Clasen <mclasen redhat com>
Date:   Thu Mar 12 23:57:24 2020 -0400

    more win32 build fixes

 gtk/gtkimcontextime.c | 16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)
---
diff --git a/gtk/gtkimcontextime.c b/gtk/gtkimcontextime.c
index 1c814ebe1b..8069632e88 100644
--- a/gtk/gtkimcontextime.c
+++ b/gtk/gtkimcontextime.c
@@ -1114,16 +1114,20 @@ static void
 get_window_position (GdkSurface *surface, gint *x, gint *y)
 {
   GdkSurface *parent, *toplevel;
-  gint wx, wy;
 
   g_return_if_fail (GDK_IS_SURFACE (surface));
   g_return_if_fail (x && y);
 
-  gdk_surface_get_position (surface, &wx, &wy);
-  *x += wx;
-  *y += wy;
-  parent = gdk_surface_get_parent (surface);
-  toplevel = surface;
+  if (GDK_IS_POPUP (surface))
+    {
+      parent = gdk_popup_get_parent (GDK_POPUP (surface));
+      toplevel = surface;
+    }
+  else
+    {
+      parent = NULL;
+      toplevel = surface;
+    }
 
   if (parent && parent != toplevel)
     get_window_position (parent, x, y);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]