mirror of
https://github.com/brl/mutter.git
synced 2024-11-25 01:20:42 -05:00
tests/test-client: Add commands to maximize/unmaximize
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1171
This commit is contained in:
parent
132060db21
commit
76083d76af
@ -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]);
|
||||||
|
@ -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)
|
||||||
|
Loading…
Reference in New Issue
Block a user