mirror of
https://github.com/brl/mutter.git
synced 2024-11-21 15:40:41 -05:00
tests/test-client: Add "resize" command
The "resize" command resizes a window. https://bugzilla.gnome.org/show_bug.cgi?id=790207
This commit is contained in:
parent
1266c20d4c
commit
c8a4e37e0c
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user