From c8a4e37e0cb1b602f7ac5f6b0b175fa75c6b8d3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20=C3=85dahl?= Date: Tue, 6 Feb 2018 15:40:19 +0800 Subject: [PATCH] tests/test-client: Add "resize" command The "resize" command resizes a window. https://bugzilla.gnome.org/show_bug.cgi?id=790207 --- src/tests/test-client.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/tests/test-client.c b/src/tests/test-client.c index 59915743a..f1d004cd6 100644 --- a/src/tests/test-client.c +++ b/src/tests/test-client.c @@ -239,6 +239,22 @@ process_line (const char *line) gtk_window_present (GTK_WINDOW (window)); } + else if (strcmp (argv[0], "resize") == 0) + { + if (argc != 4) + { + g_print ("usage: resize "); + goto out; + } + + GtkWidget *window = lookup_window (argv[1]); + if (!window) + goto out; + + int width = atoi (argv[2]); + int height = atoi (argv[3]); + gtk_window_resize (GTK_WINDOW (window), width, height); + } else if (strcmp (argv[0], "raise") == 0) { if (argc != 2)