diff options
author | Dalai Felinto <dfelinto@gmail.com> | 2019-11-15 18:10:55 +0300 |
---|---|---|
committer | Dalai Felinto <dfelinto@gmail.com> | 2019-11-15 18:10:55 +0300 |
commit | ef71668ac5d951736fe51abf4529e604867d45fd (patch) | |
tree | 8b73f25d3e1a43e1fd5a834c5999648303b46a6a /source/blender/windowmanager | |
parent | 97f3626533b42c08f8e8e85b66e412b315a39430 (diff) | |
parent | 49db3f6bf10d4b3cabe5f722ff2dd480ce438af6 (diff) |
Merge remote-tracking branch 'origin/blender-v2.81-release'
Diffstat (limited to 'source/blender/windowmanager')
-rw-r--r-- | source/blender/windowmanager/WM_api.h | 1 | ||||
-rw-r--r-- | source/blender/windowmanager/intern/wm_event_system.c | 12 | ||||
-rw-r--r-- | source/blender/windowmanager/intern/wm_window.c | 5 |
3 files changed, 10 insertions, 8 deletions
diff --git a/source/blender/windowmanager/WM_api.h b/source/blender/windowmanager/WM_api.h index f7abfaf565e..3abb3d8bfac 100644 --- a/source/blender/windowmanager/WM_api.h +++ b/source/blender/windowmanager/WM_api.h @@ -111,6 +111,7 @@ int WM_window_pixels_y(const struct wmWindow *win); void WM_window_rect_calc(const struct wmWindow *win, struct rcti *r_rect); void WM_window_screen_rect_calc(const struct wmWindow *win, struct rcti *r_rect); bool WM_window_is_fullscreen(struct wmWindow *win); +bool WM_window_is_maximized(struct wmWindow *win); void WM_windows_scene_data_sync(const ListBase *win_lb, struct Scene *scene) ATTR_NONNULL(); struct Scene *WM_windows_scene_get_from_screen(const struct wmWindowManager *wm, diff --git a/source/blender/windowmanager/intern/wm_event_system.c b/source/blender/windowmanager/intern/wm_event_system.c index f52e958c4ca..c63bc24d58e 100644 --- a/source/blender/windowmanager/intern/wm_event_system.c +++ b/source/blender/windowmanager/intern/wm_event_system.c @@ -2401,13 +2401,9 @@ static int wm_handler_fileselect_do(bContext *C, if (screen->temp && (file_sa->spacetype == SPACE_FILE)) { int win_size[2]; - - /* Get DPI/pixelsize independent size to be stored in preferences. */ - WM_window_set_dpi(temp_win); /* Ensure the DPI is taken from the right window. */ - win_size[0] = WM_window_pixels_x(temp_win) / UI_DPI_FAC; - win_size[1] = WM_window_pixels_y(temp_win) / UI_DPI_FAC; - - ED_fileselect_params_to_userdef(file_sa->spacedata.first, win_size); + bool is_maximized; + ED_fileselect_window_params_get(temp_win, win_size, &is_maximized); + ED_fileselect_params_to_userdef(file_sa->spacedata.first, win_size, is_maximized); if (BLI_listbase_is_single(&file_sa->spacedata)) { BLI_assert(ctx_win != temp_win); @@ -2437,7 +2433,7 @@ static int wm_handler_fileselect_do(bContext *C, } if (!temp_win && ctx_sa->full) { - ED_fileselect_params_to_userdef(ctx_sa->spacedata.first, NULL); + ED_fileselect_params_to_userdef(ctx_sa->spacedata.first, NULL, false); ED_screen_full_prevspace(C, ctx_sa); } } diff --git a/source/blender/windowmanager/intern/wm_window.c b/source/blender/windowmanager/intern/wm_window.c index fa2320585d7..020589dcf3d 100644 --- a/source/blender/windowmanager/intern/wm_window.c +++ b/source/blender/windowmanager/intern/wm_window.c @@ -2191,6 +2191,11 @@ bool WM_window_is_fullscreen(wmWindow *win) return win->windowstate == GHOST_kWindowStateFullScreen; } +bool WM_window_is_maximized(wmWindow *win) +{ + return win->windowstate == GHOST_kWindowStateMaximized; +} + /** \} */ /* -------------------------------------------------------------------- */ |