Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
2fcf40a6
Commit
2fcf40a6
authored
Oct 25, 2023
by
Brendan Shanks
Committed by
Alexandre Julliard
Oct 27, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winemac.drv: Fix minimizing windows when Stage Manager is enabled.
parent
e8943a64
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
0 deletions
+25
-0
cocoa_window.m
dlls/winemac.drv/cocoa_window.m
+25
-0
No files found.
dlls/winemac.drv/cocoa_window.m
View file @
2fcf40a6
...
...
@@ -161,6 +161,21 @@ static inline NSUInteger adjusted_modifiers_for_settings(NSUInteger modifiers)
return
new_modifiers
;
}
static
inline
BOOL
stage_manager_enabled
(
void
)
{
/* There is no documented way to determine if Stage Manager is enabled,
* but this seems like the best option.
*/
if
(
floor
(
NSAppKitVersionNumber
)
>=
2299
/* NSAppKitVersionNumber13_0 */
)
{
NSUserDefaults
*
defs
=
[[
NSUserDefaults
alloc
]
initWithSuiteName
:
@"com.apple.WindowManager.plist"
];
BOOL
enabled
=
[
defs
boolForKey
:
@"GloballyEnabled"
];
[
defs
release
];
return
enabled
;
}
return
FALSE
;
}
@interface
NSWindow
(
WineAccessPrivateMethods
)
-
(
id
)
_displayChanged
;
...
...
@@ -2576,6 +2591,16 @@ static CVReturn WineDisplayLinkCallback(CVDisplayLinkRef displayLink, const CVTi
-
(
void
)
miniaturize
:
(
id
)
sender
{
/* When Stage Manager is enabled, miniaturize: just moves the app/window to
* the background rather than minimizing the window.
* Don't start minimizing the window on the Win32 side.
*/
if
(
stage_manager_enabled
())
{
[
super
miniaturize
:
sender
];
return
;
}
macdrv_event
*
event
=
macdrv_create_event
(
WINDOW_MINIMIZE_REQUESTED
,
self
);
[
queue
postEvent
:
event
];
macdrv_release_event
(
event
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment