tests/test-client: Add commands to maximize/unmaximize

https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1171
This commit is contained in:
Jonas Ådahl 2020-04-01 15:19:21 +02:00 committed by Georges Basile Stavracas Neto
parent 132060db21
commit 76083d76af
2 changed files with 30 additions and 0 deletions

View File

@ -690,6 +690,34 @@ process_line (const char *line)
gtk_window_deiconify (GTK_WINDOW (window)); 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 else
{ {
g_print ("Unknown command %s", argv[0]); g_print ("Unknown command %s", argv[0]);

View File

@ -510,6 +510,8 @@ test_case_do (TestCase *test,
strcmp (argv[0], "lower") == 0 || strcmp (argv[0], "lower") == 0 ||
strcmp (argv[0], "minimize") == 0 || strcmp (argv[0], "minimize") == 0 ||
strcmp (argv[0], "unminimize") == 0 || strcmp (argv[0], "unminimize") == 0 ||
strcmp (argv[0], "maximize") == 0 ||
strcmp (argv[0], "unmaximize") == 0 ||
strcmp (argv[0], "destroy") == 0) strcmp (argv[0], "destroy") == 0)
{ {
if (argc != 2) if (argc != 2)