weston-terminal: Add a --maximized command line parameter

This is useful for testing compositor response to a client that
requests a maximized initial surface.

Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
dev
Derek Foreman 8 years ago committed by Daniel Stone
parent 5a313c2f00
commit 7609178917
  1. 5
      clients/terminal.c

@ -49,6 +49,7 @@
#include "window.h"
static int option_fullscreen;
static int option_maximize;
static char *option_font;
static int option_font_size;
static char *option_term;
@ -3048,6 +3049,8 @@ terminal_run(struct terminal *terminal, const char *path)
if (option_fullscreen)
window_set_fullscreen(terminal->window, 1);
else if (option_maximize)
window_set_maximized(terminal->window, 1);
else
terminal_resize(terminal, 80, 24);
@ -3056,6 +3059,7 @@ terminal_run(struct terminal *terminal, const char *path)
static const struct weston_option terminal_options[] = {
{ WESTON_OPTION_BOOLEAN, "fullscreen", 'f', &option_fullscreen },
{ WESTON_OPTION_BOOLEAN, "maximized", 'm', &option_maximize },
{ WESTON_OPTION_STRING, "font", 0, &option_font },
{ WESTON_OPTION_INTEGER, "font-size", 0, &option_font_size },
{ WESTON_OPTION_STRING, "shell", 0, &option_shell },
@ -3089,6 +3093,7 @@ int main(int argc, char *argv[])
ARRAY_LENGTH(terminal_options), &argc, argv) > 1) {
printf("Usage: %s [OPTIONS]\n"
" --fullscreen or -f\n"
" --maximized or -m\n"
" --font=NAME\n"
" --font-size=SIZE\n"
" --shell=NAME\n", argv[0]);

Loading…
Cancel
Save