diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-02-11 06:46:25 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-02-11 06:46:25 +0300 |
commit | 1daaa74b089875562117b3978e5fe9783c21bbf5 (patch) | |
tree | e527616d0b9695a0fe9375f4a2efc4d6ad14668f /source/creator | |
parent | f5249b4e300b0e117051ee92283ce1fdea7bcbc8 (diff) |
WM: command line args to start blender maximized
Part of D4323 by @DragMZ
Diffstat (limited to 'source/creator')
-rw-r--r-- | source/creator/creator_args.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/source/creator/creator_args.c b/source/creator/creator_args.c index 3c0698994f9..470bb47c980 100644 --- a/source/creator/creator_args.c +++ b/source/creator/creator_args.c @@ -496,6 +496,7 @@ static int arg_handle_print_help(int UNUSED(argc), const char **UNUSED(argv), vo BLI_argsPrintArgDoc(ba, "--window-border"); BLI_argsPrintArgDoc(ba, "--window-fullscreen"); BLI_argsPrintArgDoc(ba, "--window-geometry"); + BLI_argsPrintArgDoc(ba, "--window-maximized"); BLI_argsPrintArgDoc(ba, "--start-console"); BLI_argsPrintArgDoc(ba, "--no-native-pixels"); BLI_argsPrintArgDoc(ba, "--no-window-focus"); @@ -1140,6 +1141,15 @@ static int arg_handle_without_borders(int UNUSED(argc), const char **UNUSED(argv return 0; } +static const char arg_handle_window_maximized_doc[] = +"\n\tForce opening maximized." +; +static int arg_handle_window_maximized(int UNUSED(argc), const char **UNUSED(argv), void *UNUSED(data)) +{ + WM_init_state_maximized_set(); + return 0; +} + static const char arg_handle_no_window_focus_doc[] = "\n\tOpen behind other windows and without taking focus." ; @@ -1970,6 +1980,7 @@ void main_args_setup(bContext *C, bArgs *ba) BLI_argsAdd(ba, 2, "-p", "--window-geometry", CB(arg_handle_window_geometry), NULL); BLI_argsAdd(ba, 2, "-w", "--window-border", CB(arg_handle_with_borders), NULL); BLI_argsAdd(ba, 2, "-W", "--window-fullscreen", CB(arg_handle_without_borders), NULL); + BLI_argsAdd(ba, 2, "-M", "--window-maximized", CB(arg_handle_window_maximized), NULL); BLI_argsAdd(ba, 2, NULL, "--no-window-focus", CB(arg_handle_no_window_focus), NULL); BLI_argsAdd(ba, 2, "-con", "--start-console", CB(arg_handle_start_with_console), NULL); BLI_argsAdd(ba, 2, "-R", NULL, CB(arg_handle_register_extension), NULL); |