diff options
author | Julian Eisel <eiseljulian@gmail.com> | 2019-09-04 03:01:44 +0300 |
---|---|---|
committer | Julian Eisel <eiseljulian@gmail.com> | 2019-09-04 03:01:44 +0300 |
commit | da25aca2677ec2b566cad1809eebceee22b28b53 (patch) | |
tree | 14374181283f47820cf1906e96ef226c231f93f6 /source/blender/windowmanager | |
parent | 0c7bfdf9a50de0c98e7e9ee55511c842148dae6b (diff) |
Fix T69463: File Browser opens off-center on hiDPI
wmWindow.sizex/y doesn't have system's pixel size applied.
Diffstat (limited to 'source/blender/windowmanager')
-rw-r--r-- | source/blender/windowmanager/intern/wm_event_system.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/source/blender/windowmanager/intern/wm_event_system.c b/source/blender/windowmanager/intern/wm_event_system.c index 9fe53cb3af0..7192b25a7d5 100644 --- a/source/blender/windowmanager/intern/wm_event_system.c +++ b/source/blender/windowmanager/intern/wm_event_system.c @@ -2343,8 +2343,12 @@ static int wm_handler_fileselect_do(bContext *C, const int sizex = 1020 * UI_DPI_FAC; const int sizey = 600 * UI_DPI_FAC; - if (WM_window_open_temp( - C, win->sizex / 2, win->sizey / 2, sizex, sizey, WM_WINDOW_FILESEL) != NULL) { + if (WM_window_open_temp(C, + WM_window_pixels_x(win) / 2, + WM_window_pixels_y(win) / 2, + sizex, + sizey, + WM_WINDOW_FILESEL) != NULL) { ScrArea *area = CTX_wm_area(C); ARegion *region_header = BKE_area_find_region_type(area, RGN_TYPE_HEADER); |