[PATCH 0/1] MR2789: winemac: Initialize retina_on to avoid incorrect cached display data in high-res/retina mode.
retina_enabled is set to the value of the RetinaEnabled registry key, and retina_on is TRUE when: retina_enabled is TRUE, and the display mode has not changed since Wine was launched. retina_on was being set (indirectly) by check_retina_status(), but it relies on retina_on itself. (check_retina_status() -> create_original_display_mode_descriptor() -> init_original_display_mode() -> macdrv_get_displays() -> cgrect_win_from_mac() which accesses retina_on) This resulted in incorrect (non-retina) monitor and work RECTs being cached, causing odd application bugs like a window that won't resize larger than 1/4 of the screen. Initialize retina_on to the value of retina_enabled, so later calls to check_retina_status() don't result in incorrect data being cached. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/2789
From: Brendan Shanks <bshanks(a)codeweavers.com> retina_on was being set (indirectly) by check_retina_status(), but it relies on retina_on itself. This resulted in incorrect (non-retina) monitor and work RECTs being cached, causing odd application bugs like a window that won't resize larger than 1/4 of the screen. Initialize retina_on to the value of retina_enabled, so later calls to check_retina_status() don't result in incorrect data being cached. --- dlls/winemac.drv/macdrv_main.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dlls/winemac.drv/macdrv_main.c b/dlls/winemac.drv/macdrv_main.c index 7e91e0ca3e1..9b9e2c94181 100644 --- a/dlls/winemac.drv/macdrv_main.c +++ b/dlls/winemac.drv/macdrv_main.c @@ -383,6 +383,8 @@ static void setup_options(void) if (!get_config_key(hkey, NULL, "RetinaMode", buffer, sizeof(buffer))) retina_enabled = IS_OPTION_TRUE(buffer[0]); + retina_on = retina_enabled; + if (appkey) NtClose(appkey); if (hkey) NtClose(hkey); } -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/2789
participants (2)
-
Brendan Shanks -
Brendan Shanks (@bshanks)