[gtk/kill-popup-windows: 2/3] testsuite: Stop using gdk_surface_new_temp



commit 9e70c5d141ec16008ef2982d49129693b5f8788c
Author: Matthias Clasen <mclasen redhat com>
Date:   Mon Dec 30 01:23:26 2019 -0500

    testsuite: Stop using gdk_surface_new_temp
    
    We can just use regular toplevels here.

 testsuite/gtk/defaultvalue.c | 3 +--
 testsuite/gtk/notify.c       | 3 +--
 2 files changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/testsuite/gtk/defaultvalue.c b/testsuite/gtk/defaultvalue.c
index cfe9623cf2..ea64a5b5de 100644
--- a/testsuite/gtk/defaultvalue.c
+++ b/testsuite/gtk/defaultvalue.c
@@ -106,8 +106,7 @@ test_type (gconstpointer data)
     instance = G_OBJECT (g_object_ref (gtk_settings_get_default ()));
   else if (g_type_is_a (type, GDK_TYPE_SURFACE))
     {
-      instance = G_OBJECT (g_object_ref (gdk_surface_new_temp (display,
-                                                                &(GdkRectangle) { 0, 0, 100, 100 })));
+      instance = G_OBJECT (g_object_ref (gdk_surface_new_toplevel (display, 100, 100)));
     }
   else if (g_type_is_a (type, GTK_TYPE_FILTER_LIST_MODEL) ||
            g_type_is_a (type, GTK_TYPE_NO_SELECTION) ||
diff --git a/testsuite/gtk/notify.c b/testsuite/gtk/notify.c
index 9df21507c6..9fb04fb89f 100644
--- a/testsuite/gtk/notify.c
+++ b/testsuite/gtk/notify.c
@@ -425,8 +425,7 @@ test_type (gconstpointer data)
     instance = G_OBJECT (g_object_ref (gtk_settings_get_default ()));
   else if (g_type_is_a (type, GDK_TYPE_SURFACE))
     {
-      instance = G_OBJECT (g_object_ref (gdk_surface_new_temp (display,
-                                                               &(GdkRectangle) { 0, 0, 100, 100 })));
+      instance = G_OBJECT (g_object_ref (gdk_surface_new_toplevel (display, 100, 100)));
     }
   else if (g_str_equal (g_type_name (type), "GdkX11Cursor"))
     instance = g_object_new (type, "display", display, NULL);


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