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
675b0525
Commit
675b0525
authored
Sep 02, 2013
by
Ken Thomases
Committed by
Alexandre Julliard
Sep 03, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winemac: When ordering sibling child windows, don't remove and re-add ones…
winemac: When ordering sibling child windows, don't remove and re-add ones already in the right order.
parent
987309e5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
2 deletions
+14
-2
cocoa_window.m
dlls/winemac.drv/cocoa_window.m
+14
-2
No files found.
dlls/winemac.drv/cocoa_window.m
View file @
675b0525
...
...
@@ -875,7 +875,8 @@ static inline void fix_generic_modifiers_by_device(NSUInteger* modifiers)
{
NSMutableArray
*
windowNumbers
;
NSNumber
*
childWindowNumber
;
NSUInteger
otherIndex
;
NSUInteger
otherIndex
,
limit
;
NSArray
*
origChildren
;
NSMutableArray
*
children
;
// Get the z-order from the window server and modify it to reflect the
...
...
@@ -888,7 +889,8 @@ static inline void fix_generic_modifiers_by_device(NSUInteger* modifiers)
// Get our child windows and sort them in the reverse of the desired
// z-order (back-to-front).
children
=
[[[
self
childWindows
]
mutableCopy
]
autorelease
];
origChildren
=
[
self
childWindows
];
children
=
[[
origChildren
mutableCopy
]
autorelease
];
[
children
sortWithOptions
:
NSSortStable
usingComparator
:
^
NSComparisonResult
(
id
obj1
,
id
obj2
){
NSNumber
*
window1Number
=
[
NSNumber
numberWithInteger
:[
obj1
windowNumber
]];
...
...
@@ -912,6 +914,16 @@ static inline void fix_generic_modifiers_by_device(NSUInteger* modifiers)
return
NSOrderedSame
;
}];
// If the current and desired children arrays match up to a point, leave
// those matching children alone.
limit
=
MIN
([
origChildren
count
],
[
children
count
]);
for
(
otherIndex
=
0
;
otherIndex
<
limit
;
otherIndex
++
)
{
if
([
origChildren
objectAtIndex
:
otherIndex
]
!=
[
children
objectAtIndex
:
otherIndex
])
break
;
}
[
children
removeObjectsInRange
:
NSMakeRange
(
0
,
otherIndex
)];
// Remove all of the child windows and re-add them back-to-front so they
// are in the desired order.
for
(
other
in
children
)
...
...
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