From a311fa96aa428b611bc07c4d7f8a002dd3e6b462 Mon Sep 17 00:00:00 2001 From: Harley Acheson Date: Wed, 12 Jan 2022 10:37:52 -0800 Subject: Fix T85706: wm_window_make_drawable update DPI When drawing windows on monitors that differ in DPI, we can sometimes have UI elements draw at an incorrect scale. This patch just ensures that `wm_window_make_drawable` always updates DPI. See D10483 for more details. Differential Revision: https://developer.blender.org/D10483 Reviewed by Brecht Van Lommel --- source/blender/windowmanager/intern/wm_window.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source') diff --git a/source/blender/windowmanager/intern/wm_window.c b/source/blender/windowmanager/intern/wm_window.c index 29c9f53f735..a1854a8ed86 100644 --- a/source/blender/windowmanager/intern/wm_window.c +++ b/source/blender/windowmanager/intern/wm_window.c @@ -1033,7 +1033,9 @@ void wm_window_make_drawable(wmWindowManager *wm, wmWindow *win) } wm_window_set_drawable(wm, win, true); + } + if (win->ghostwin) { /* this can change per window */ WM_window_set_dpi(win); } -- cgit v1.2.3