[mutter] tests/test-client: Add "resize" command
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] tests/test-client: Add "resize" command
- Date: Wed, 14 Nov 2018 21:37:38 +0000 (UTC)
commit c8a4e37e0cb1b602f7ac5f6b0b175fa75c6b8d3a
Author: Jonas Ã…dahl <jadahl gmail com>
Date: Tue Feb 6 15:40:19 2018 +0800
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 <id> <width> <height>");
+ 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)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]