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
b3cc34e5
Commit
b3cc34e5
authored
Dec 11, 2013
by
Ken Thomases
Committed by
Alexandre Julliard
Dec 12, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winemac: While a window is being dragged, suppress mouse events and disable…
winemac: While a window is being dragged, suppress mouse events and disable cursor clipping and warping.
parent
cd10a0df
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
37 additions
and
4 deletions
+37
-4
cocoa_app.h
dlls/winemac.drv/cocoa_app.h
+2
-0
cocoa_app.m
dlls/winemac.drv/cocoa_app.m
+35
-4
No files found.
dlls/winemac.drv/cocoa_app.h
View file @
b3cc34e5
...
...
@@ -89,6 +89,8 @@ enum {
NSImage
*
applicationIcon
;
BOOL
beenActive
;
NSMutableSet
*
windowsBeingDragged
;
}
@property
(
nonatomic
)
CGEventSourceKeyboardType
keyboardType
;
...
...
dlls/winemac.drv/cocoa_app.m
View file @
b3cc34e5
...
...
@@ -154,6 +154,8 @@ int macdrv_err_on;
warpRecords
=
[[
NSMutableArray
alloc
]
init
];
windowsBeingDragged
=
[[
NSMutableSet
alloc
]
init
];
if
(
!
requests
||
!
requestsManipQueue
||
!
eventQueues
||
!
eventQueuesLock
||
!
keyWindows
||
!
originalDisplayModes
||
!
latentDisplayModes
||
!
warpRecords
)
{
...
...
@@ -173,6 +175,7 @@ int macdrv_err_on;
-
(
void
)
dealloc
{
[
windowsBeingDragged
release
];
[
cursor
release
];
[
screenFrameCGRects
release
];
[
applicationIcon
release
];
...
...
@@ -1258,7 +1261,9 @@ int macdrv_err_on;
{
BOOL
ret
;
if
(
clippingCursor
)
if
([
windowsBeingDragged
count
])
ret
=
FALSE
;
else
if
(
clippingCursor
)
{
[
self
clipCursorLocation
:
&
pos
];
...
...
@@ -1335,7 +1340,7 @@ int macdrv_err_on;
-
(
void
)
updateCursorClippingState
{
if
(
clippingCursor
&&
[
NSApp
isActive
])
if
(
clippingCursor
&&
[
NSApp
isActive
]
&&
!
[
windowsBeingDragged
count
]
)
[
self
activateCursorClipping
];
else
[
self
deactivateCursorClipping
];
...
...
@@ -1395,7 +1400,9 @@ int macdrv_err_on;
WineWindow
*
targetWindow
;
BOOL
drag
=
[
anEvent
type
]
!=
NSMouseMoved
;
if
(
mouseCaptureWindow
)
if
([
windowsBeingDragged
count
])
targetWindow
=
nil
;
else
if
(
mouseCaptureWindow
)
targetWindow
=
mouseCaptureWindow
;
else
if
(
drag
)
targetWindow
=
(
WineWindow
*
)[
anEvent
window
];
...
...
@@ -1620,7 +1627,9 @@ int macdrv_err_on;
}
}
if
(
mouseCaptureWindow
)
if
([
windowsBeingDragged
count
])
window
=
nil
;
else
if
(
mouseCaptureWindow
)
window
=
mouseCaptureWindow
;
if
([
window
isKindOfClass
:[
WineWindow
class
]])
...
...
@@ -1861,6 +1870,26 @@ int macdrv_err_on;
[
window
postKeyEvent
:
anEvent
];
}
}
else
if
(
type
==
NSAppKitDefined
)
{
short
subtype
=
[
anEvent
subtype
];
// These subtypes are not documented but they appear to mean
// "a window is being dragged" and "a window is no longer being
// dragged", respectively.
if
(
subtype
==
20
||
subtype
==
21
)
{
WineWindow
*
window
=
(
WineWindow
*
)[
anEvent
window
];
if
([
window
isKindOfClass
:[
WineWindow
class
]])
{
if
(
subtype
==
20
)
[
windowsBeingDragged
addObject
:
window
];
else
[
windowsBeingDragged
removeObject
:
window
];
[
self
updateCursorClippingState
];
}
}
}
return
ret
;
}
...
...
@@ -1917,6 +1946,8 @@ int macdrv_err_on;
[
self
updateFullscreenWindows
];
});
}
[
windowsBeingDragged
removeObject
:
window
];
[
self
updateCursorClippingState
];
}];
[
nc
addObserver
:
self
...
...
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