diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-10-01 18:23:18 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-10-01 18:29:48 +0300 |
commit | ac0dfcced30a75fed4017c0b5e1dc8600e6f1dd8 (patch) | |
tree | 601dd5343f788d786dd613d208208c3bd9fac844 /source/blender/windowmanager/intern/wm_window.c | |
parent | f40ff6264796692fd9148a54112ef347154173bb (diff) |
UI: start maximized on X11 if possible, like other platforms.
Diffstat (limited to 'source/blender/windowmanager/intern/wm_window.c')
-rw-r--r-- | source/blender/windowmanager/intern/wm_window.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/source/blender/windowmanager/intern/wm_window.c b/source/blender/windowmanager/intern/wm_window.c index 4363591299e..6d368cc593a 100644 --- a/source/blender/windowmanager/intern/wm_window.c +++ b/source/blender/windowmanager/intern/wm_window.c @@ -732,14 +732,16 @@ void wm_window_ghostwindows_ensure(wmWindowManager *wm) wm_init_state.start_y = 0; #ifdef WITH_X11 /* X11 */ - /* X11, start maximized but use default sane size */ - wm_init_state.size_x = min_ii(wm_init_state.size_x, WM_WIN_INIT_SIZE_X); - wm_init_state.size_y = min_ii(wm_init_state.size_y, WM_WIN_INIT_SIZE_Y); - /* pad */ - wm_init_state.start_x = WM_WIN_INIT_PAD; - wm_init_state.start_y = WM_WIN_INIT_PAD; - wm_init_state.size_x -= WM_WIN_INIT_PAD * 2; - wm_init_state.size_y -= WM_WIN_INIT_PAD * 2; + if (wm_init_state.size_x == 0 || wm_init_state.size_y == 0) { + /* X11, start maximized but use default sane size */ + wm_init_state.size_x = min_ii(wm_init_state.size_x, WM_WIN_INIT_SIZE_X); + wm_init_state.size_y = min_ii(wm_init_state.size_y, WM_WIN_INIT_SIZE_Y); + /* pad */ + wm_init_state.start_x = WM_WIN_INIT_PAD; + wm_init_state.start_y = WM_WIN_INIT_PAD; + wm_init_state.size_x -= WM_WIN_INIT_PAD * 2; + wm_init_state.size_y -= WM_WIN_INIT_PAD * 2; + } #endif } |