diff options
author | Matthias Clasen <mclasen@redhat.com> | 2020-08-05 16:19:19 +0000 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2020-08-05 16:19:19 +0000 |
commit | d7c4f93c76eaeab7d90fef486bc6eed9e3c6580c (patch) | |
tree | abf8dfa7f2b159397c61b93ce1383dcff09262bb /tests | |
parent | 0b0f7dc9c0d6350babaacad26156f7a06eb69585 (diff) | |
parent | 2ff74eb667c2cbe293c7309d5661fa438e8431c4 (diff) | |
download | gtk+-d7c4f93c76eaeab7d90fef486bc6eed9e3c6580c.tar.gz |
Merge branch 'wip/compute-size' into 'master'
Compute size via signal
See merge request GNOME/gtk!2325
Diffstat (limited to 'tests')
-rw-r--r-- | tests/rendernode.c | 2 | ||||
-rw-r--r-- | tests/showrendernode.c | 4 | ||||
-rw-r--r-- | tests/testfullscreen.c | 14 |
3 files changed, 7 insertions, 13 deletions
diff --git a/tests/rendernode.c b/tests/rendernode.c index 49a6c8601c..786cc6d050 100644 --- a/tests/rendernode.c +++ b/tests/rendernode.c @@ -128,7 +128,7 @@ main(int argc, char **argv) GdkSurface *window; GdkTexture *texture = NULL; - window = gdk_surface_new_toplevel (gdk_display_get_default(), 10 , 10); + window = gdk_surface_new_toplevel (gdk_display_get_default()); renderer = gsk_renderer_new_for_surface (window); for (run = 0; run < runs; run++) diff --git a/tests/showrendernode.c b/tests/showrendernode.c index 670e776e1d..25e9960251 100644 --- a/tests/showrendernode.c +++ b/tests/showrendernode.c @@ -181,7 +181,7 @@ main (int argc, char **argv) if (write_to_filename != NULL) { - GdkSurface *surface = gdk_surface_new_toplevel (gdk_display_get_default(), 10 , 10); + GdkSurface *surface = gdk_surface_new_toplevel (gdk_display_get_default()); GskRenderer *renderer = gsk_renderer_new_for_surface (surface); GdkTexture *texture = gsk_renderer_render_texture (renderer, GTK_NODE_VIEW (nodeview)->node, NULL); @@ -201,7 +201,7 @@ main (int argc, char **argv) if (compare_node) { GtkWidget *box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 12); - GdkSurface *gdk_surface = gdk_surface_new_toplevel (gdk_display_get_default(), 10 , 10); + GdkSurface *gdk_surface = gdk_surface_new_toplevel (gdk_display_get_default()); GskRenderer *renderer = gsk_renderer_new_for_surface (gdk_surface); GdkTexture *texture = gsk_renderer_render_texture (renderer, GTK_NODE_VIEW (nodeview)->node, NULL); GtkWidget *image = gtk_image_new_from_paintable (GDK_PAINTABLE (texture)); diff --git a/tests/testfullscreen.c b/tests/testfullscreen.c index c7deda5e92..3adc82310f 100644 --- a/tests/testfullscreen.c +++ b/tests/testfullscreen.c @@ -34,13 +34,10 @@ set_fullscreen_monitor_cb (GtkWidget *widget, gpointer user_data) monitor = gdk_display_get_monitor_at_surface (display, surface); else monitor = NULL; - layout = gdk_toplevel_layout_new (0, 0); + layout = gdk_toplevel_layout_new (); gdk_toplevel_layout_set_resizable (layout, TRUE); gdk_toplevel_layout_set_fullscreen (layout, TRUE, monitor); - gdk_toplevel_present (GDK_TOPLEVEL (surface), - gdk_surface_get_width (surface), - gdk_surface_get_height (surface), - layout); + gdk_toplevel_present (GDK_TOPLEVEL (surface), layout); gdk_toplevel_layout_unref (layout); } @@ -51,13 +48,10 @@ remove_fullscreen_cb (GtkWidget *widget, gpointer user_data) GdkToplevelLayout *layout; surface = gtk_native_get_surface (gtk_widget_get_native (widget)); - layout = gdk_toplevel_layout_new (0, 0); + layout = gdk_toplevel_layout_new (); gdk_toplevel_layout_set_resizable (layout, TRUE); gdk_toplevel_layout_set_fullscreen (layout, FALSE, NULL); - gdk_toplevel_present (GDK_TOPLEVEL (surface), - gdk_surface_get_width (surface), - gdk_surface_get_height (surface), - layout); + gdk_toplevel_present (GDK_TOPLEVEL (surface), layout); gdk_toplevel_layout_unref (layout); } |