Module: wine
Branch: stable
Commit: 8b798ab30ecf29379105d5e386893f537de127d7
URL: https://gitlab.winehq.org/wine/wine/-/commit/8b798ab30ecf29379105d5e386893f…
Author: Brendan Shanks <bshanks(a)codeweavers.com>
Date: Tue May 9 15:22:44 2023 -0700
winemac: Initialize retina_on to avoid incorrect cached display data in high-res/retina mode.
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.
(cherry picked from commit d2789ef0678619d7c56a9e0c1aaa06f582a41ee3)
---
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 eeed9a4bcbe..db4426db782 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);
}
Module: wine
Branch: stable
Commit: 986c200a0b751f682f4161a6b11aeccca7a7d448
URL: https://gitlab.winehq.org/wine/wine/-/commit/986c200a0b751f682f4161a6b11aec…
Author: Tim Clem <tclem(a)codeweavers.com>
Date: Fri May 5 10:02:07 2023 -0700
winemac.drv: Force a window in front of its peers if its level is decreased.
Working around a macOS bug: -setLevel: is documented to move a window
in front of its new peers, but that doesn't happen on Ventura.
(cherry picked from commit 222d20a585c454cb591e3dc539f3bd52427ea30c)
---
dlls/winemac.drv/cocoa_app.m | 16 +++++++++++-----
1 file changed, 11 insertions(+), 5 deletions(-)
diff --git a/dlls/winemac.drv/cocoa_app.m b/dlls/winemac.drv/cocoa_app.m
index d9d56da20f8..6a16d1ba832 100644
--- a/dlls/winemac.drv/cocoa_app.m
+++ b/dlls/winemac.drv/cocoa_app.m
@@ -633,18 +633,24 @@ static NSString* WineLocalizedString(unsigned int stringID)
{
[window setLevel:newLevel];
- // -setLevel: puts the window at the front of its new level. If
- // we decreased the level, that's good (it was in front of that
- // level before, so it should still be now). But if we increased
- // the level, the window should be toward the back (but still
- // ahead of the previous windows we did this to).
if (origLevel < newLevel)
{
+ // If we increased the level, the window should be toward the
+ // back of its new level (but still ahead of the previous
+ // windows we did this to).
if (prev)
[window orderWindow:NSWindowAbove relativeTo:[prev windowNumber]];
else
[window orderBack:nil];
}
+ else
+ {
+ // If we decreased the level, we want the window at the top
+ // of its new level. -setLevel: is documented to do that on
+ // its own, but that's buggy on Ventura. Since we're looping
+ // back-to-front here, -orderFront: will do the right thing.
+ [window orderFront:nil];
+ }
}
prev = window;
Module: wine
Branch: stable
Commit: 625f480cbf12f9085b89dec8149e9f4b204f7814
URL: https://gitlab.winehq.org/wine/wine/-/commit/625f480cbf12f9085b89dec8149e9f…
Author: Brendan Shanks <bshanks(a)codeweavers.com>
Date: Thu Mar 30 16:32:21 2023 -0700
winemac: Don't constrain surface dimensions to the onscreen part of a window.
Fixes an issue where a window's image would be stretched as it was moved
further offscreen.
The offscreen part of a window also did not display correctly in Exposé.
(cherry picked from commit 06011209d7fac818c1ffd268ef083dafea6c013b)
---
dlls/winemac.drv/window.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/dlls/winemac.drv/window.c b/dlls/winemac.drv/window.c
index a3690585127..104100a0770 100644
--- a/dlls/winemac.drv/window.c
+++ b/dlls/winemac.drv/window.c
@@ -2037,10 +2037,8 @@ LRESULT macdrv_WindowMessage(HWND hwnd, UINT msg, WPARAM wp, LPARAM lp)
static inline RECT get_surface_rect(const RECT *visible_rect)
{
- RECT rect;
- RECT desktop_rect = rect_from_cgrect(macdrv_get_desktop_rect());
+ RECT rect = *visible_rect;
- intersect_rect(&rect, visible_rect, &desktop_rect);
OffsetRect(&rect, -visible_rect->left, -visible_rect->top);
rect.left &= ~127;
rect.top &= ~127;