[mutter] tests/test-client: Add commands to maximize/unmaximize
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] tests/test-client: Add commands to maximize/unmaximize
- Date: Thu, 7 May 2020 23:31:03 +0000 (UTC)
commit 76083d76af40927773f4742fb2cd02abc2f6f993
Author: Jonas Ã…dahl <jadahl gmail com>
Date: Wed Apr 1 15:19:21 2020 +0200
tests/test-client: Add commands to maximize/unmaximize
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1171
src/tests/test-client.c | 28 ++++++++++++++++++++++++++++
src/tests/test-runner.c | 2 ++
2 files changed, 30 insertions(+)
---
diff --git a/src/tests/test-client.c b/src/tests/test-client.c
index 83a5ce485..3bb2a9a02 100644
--- a/src/tests/test-client.c
+++ b/src/tests/test-client.c
@@ -690,6 +690,34 @@ process_line (const char *line)
gtk_window_deiconify (GTK_WINDOW (window));
}
+ else if (strcmp (argv[0], "maximize") == 0)
+ {
+ if (argc != 2)
+ {
+ g_print ("usage: maximize <id>");
+ goto out;
+ }
+
+ GtkWidget *window = lookup_window (argv[1]);
+ if (!window)
+ goto out;
+
+ gtk_window_maximize (GTK_WINDOW (window));
+ }
+ else if (strcmp (argv[0], "unmaximize") == 0)
+ {
+ if (argc != 2)
+ {
+ g_print ("usage: unmaximize <id>");
+ goto out;
+ }
+
+ GtkWidget *window = lookup_window (argv[1]);
+ if (!window)
+ goto out;
+
+ gtk_window_unmaximize (GTK_WINDOW (window));
+ }
else
{
g_print ("Unknown command %s", argv[0]);
diff --git a/src/tests/test-runner.c b/src/tests/test-runner.c
index 950556233..cd47addb4 100644
--- a/src/tests/test-runner.c
+++ b/src/tests/test-runner.c
@@ -510,6 +510,8 @@ test_case_do (TestCase *test,
strcmp (argv[0], "lower") == 0 ||
strcmp (argv[0], "minimize") == 0 ||
strcmp (argv[0], "unminimize") == 0 ||
+ strcmp (argv[0], "maximize") == 0 ||
+ strcmp (argv[0], "unmaximize") == 0 ||
strcmp (argv[0], "destroy") == 0)
{
if (argc != 2)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]