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
6ee48664
Commit
6ee48664
authored
Mar 17, 2013
by
Ken Thomases
Committed by
Alexandre Julliard
Mar 25, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winemac: Allow Command-[Shift-]Tab to switch apps even when the displays are captured.
parent
9714e6ee
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
56 additions
and
0 deletions
+56
-0
cocoa_app.m
dlls/winemac.drv/cocoa_app.m
+56
-0
No files found.
dlls/winemac.drv/cocoa_app.m
View file @
6ee48664
...
...
@@ -672,6 +672,49 @@ int macdrv_err_on;
[
self
setApplicationIconImage
:
nsimage
];
}
-
(
void
)
handleCommandTab
{
if
([
self
isActive
])
{
NSRunningApplication
*
thisApp
=
[
NSRunningApplication
currentApplication
];
NSRunningApplication
*
app
;
NSRunningApplication
*
otherValidApp
=
nil
;
if
([
originalDisplayModes
count
])
{
CGRestorePermanentDisplayConfiguration
();
CGReleaseAllDisplays
();
[
originalDisplayModes
removeAllObjects
];
}
for
(
app
in
[[
NSWorkspace
sharedWorkspace
]
runningApplications
])
{
if
(
!
[
app
isEqual
:
thisApp
]
&&
!
app
.
terminated
&&
app
.
activationPolicy
==
NSApplicationActivationPolicyRegular
)
{
if
(
!
app
.
hidden
)
{
// There's another visible app. Just hide ourselves and let
// the system activate the other app.
[
self
hide
:
self
];
return
;
}
if
(
!
otherValidApp
)
otherValidApp
=
app
;
}
}
// Didn't find a visible GUI app. Try the Finder or, if that's not
// running, the first hidden GUI app. If even that doesn't work, we
// just fail to switch and remain the active app.
app
=
[[
NSRunningApplication
runningApplicationsWithBundleIdentifier
:
@"com.apple.finder"
]
lastObject
];
if
(
!
app
)
app
=
otherValidApp
;
[
app
unhide
];
[
app
activateWithOptions
:
0
];
}
}
/*
* ---------- Cursor clipping methods ----------
*
...
...
@@ -1084,6 +1127,19 @@ int macdrv_err_on;
// Make sure next mouse move event starts over from an absolute baseline.
forceNextMouseMoveAbsolute
=
TRUE
;
}
else
if
(
type
==
NSKeyDown
&&
!
[
anEvent
isARepeat
]
&&
[
anEvent
keyCode
]
==
kVK_Tab
)
{
NSUInteger
modifiers
=
[
anEvent
modifierFlags
];
if
((
modifiers
&
NSCommandKeyMask
)
&&
!
(
modifiers
&
(
NSControlKeyMask
|
NSAlternateKeyMask
)))
{
// Command-Tab and Command-Shift-Tab would normally be intercepted
// by the system to switch applications. If we're seeing it, it's
// presumably because we've captured the displays, preventing
// normal application switching. Do it manually.
[
self
handleCommandTab
];
}
}
}
...
...
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