[gtk/wip/matthiasc/popup4: 72/106] menu: Stop using gdk_surface_new_temp



commit 49b8ec40d9fe37ddb02e4159611673e8aa612f9b
Author: Matthias Clasen <mclasen redhat com>
Date:   Sat Apr 20 04:32:00 2019 +0000

    menu: Stop using gdk_surface_new_temp
    
    We can just as well use gdk_surface_new_popup.

 gtk/gtkmenu.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/gtk/gtkmenu.c b/gtk/gtkmenu.c
index e7534a29c3..33054f719b 100644
--- a/gtk/gtkmenu.c
+++ b/gtk/gtkmenu.c
@@ -2191,7 +2191,8 @@ menu_grab_transfer_surface_get (GtkMenu *menu)
   GdkSurface *surface = g_object_get_data (G_OBJECT (menu), "gtk-menu-transfer-surface");
   if (!surface)
     {
-      surface = gdk_surface_new_temp (gtk_widget_get_display (GTK_WIDGET (menu)));
+      GdkRectangle rect = { -100, -100, 1, 1 };
+      surface = gdk_surface_new_popup (gtk_widget_get_display (GTK_WIDGET (menu)), &rect);
 
       gdk_surface_show (surface);
 


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