Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Eisel <eiseljulian@gmail.com>2019-09-04 03:01:44 +0300
committerJulian Eisel <eiseljulian@gmail.com>2019-09-04 03:01:44 +0300
commitda25aca2677ec2b566cad1809eebceee22b28b53 (patch)
tree14374181283f47820cf1906e96ef226c231f93f6
parent0c7bfdf9a50de0c98e7e9ee55511c842148dae6b (diff)
Fix T69463: File Browser opens off-center on hiDPI
wmWindow.sizex/y doesn't have system's pixel size applied.
-rw-r--r--source/blender/windowmanager/intern/wm_event_system.c8
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);