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



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

    more win32 build fixes

 gtk/gtkimcontextime.c | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)
---
diff --git a/gtk/gtkimcontextime.c b/gtk/gtkimcontextime.c
index 1c814ebe1b..b6594660fe 100644
--- a/gtk/gtkimcontextime.c
+++ b/gtk/gtkimcontextime.c
@@ -1119,11 +1119,16 @@ get_window_position (GdkSurface *surface, gint *x, gint *y)
   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]