Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
d22ac28f
Commit
d22ac28f
authored
Jun 07, 2013
by
Ken Thomases
Committed by
Alexandre Julliard
Jun 07, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winemac: Allow clicks on owned windows to reorder them relative to other owned…
winemac: Allow clicks on owned windows to reorder them relative to other owned windows of the same owner.
parent
f6924b96
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
4 deletions
+38
-4
cocoa_app.m
dlls/winemac.drv/cocoa_app.m
+38
-4
No files found.
dlls/winemac.drv/cocoa_app.m
View file @
d22ac28f
...
...
@@ -1424,16 +1424,50 @@ int macdrv_err_on;
-
(
void
)
handleMouseButton
:
(
NSEvent
*
)
theEvent
{
WineWindow
*
window
;
WineWindow
*
window
=
(
WineWindow
*
)[
theEvent
window
];
NSEventType
type
=
[
theEvent
type
];
if
([
window
isKindOfClass
:[
WineWindow
class
]]
&&
type
==
NSLeftMouseDown
&&
(([
theEvent
modifierFlags
]
&
(
NSShiftKeyMask
|
NSControlKeyMask
|
NSAlternateKeyMask
|
NSCommandKeyMask
))
!=
NSCommandKeyMask
))
{
NSWindowButton
windowButton
;
BOOL
broughtWindowForward
=
TRUE
;
/* Any left-click on our window anyplace other than the close or
minimize buttons will bring it forward. */
for
(
windowButton
=
NSWindowCloseButton
;
windowButton
<=
NSWindowMiniaturizeButton
;
windowButton
++
)
{
NSButton
*
button
=
[
window
standardWindowButton
:
windowButton
];
if
(
button
)
{
NSPoint
point
=
[
button
convertPoint
:[
theEvent
locationInWindow
]
fromView
:
nil
];
if
([
button
mouse
:
point
inRect
:[
button
bounds
]])
{
broughtWindowForward
=
FALSE
;
break
;
}
}
}
if
(
broughtWindowForward
)
{
// Clicking on a child window does not normally reorder it with
// respect to its siblings, but we want it to. We have to do it
// manually.
NSWindow
*
parent
=
[
window
parentWindow
];
[
parent
removeChildWindow
:
window
];
[
parent
addChildWindow
:
window
ordered
:
NSWindowAbove
];
}
}
if
(
mouseCaptureWindow
)
window
=
mouseCaptureWindow
;
else
window
=
(
WineWindow
*
)[
theEvent
window
];
if
([
window
isKindOfClass
:[
WineWindow
class
]])
{
NSEventType
type
=
[
theEvent
type
];
BOOL
pressed
=
(
type
==
NSLeftMouseDown
||
type
==
NSRightMouseDown
||
type
==
NSOtherMouseDown
);
CGPoint
pt
=
CGEventGetLocation
([
theEvent
CGEvent
]);
BOOL
process
;
...
...
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