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
cd10a0df
Commit
cd10a0df
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: Consolidate the logic for deciding if cursor clipping should be active.
parent
e3dd2775
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
8 deletions
+15
-8
cocoa_app.m
dlls/winemac.drv/cocoa_app.m
+15
-8
No files found.
dlls/winemac.drv/cocoa_app.m
View file @
cd10a0df
...
...
@@ -1316,7 +1316,7 @@ int macdrv_err_on;
-
(
void
)
activateCursorClipping
{
if
(
c
lippingCursor
)
if
(
c
ursorClippingEventTap
&&
!
CGEventTapIsEnabled
(
cursorClippingEventTap
)
)
{
CGEventTapEnable
(
cursorClippingEventTap
,
TRUE
);
[
self
setCursorPosition
:
NSPointToCGPoint
([
self
flippedMouseLocation
:[
NSEvent
mouseLocation
]])];
...
...
@@ -1325,7 +1325,7 @@ int macdrv_err_on;
-
(
void
)
deactivateCursorClipping
{
if
(
c
lippingCursor
)
if
(
c
ursorClippingEventTap
&&
CGEventTapIsEnabled
(
cursorClippingEventTap
)
)
{
CGEventTapEnable
(
cursorClippingEventTap
,
FALSE
);
[
warpRecords
removeAllObjects
];
...
...
@@ -1333,6 +1333,14 @@ int macdrv_err_on;
}
}
-
(
void
)
updateCursorClippingState
{
if
(
clippingCursor
&&
[
NSApp
isActive
])
[
self
activateCursorClipping
];
else
[
self
deactivateCursorClipping
];
}
-
(
BOOL
)
startClippingCursor
:
(
CGRect
)
rect
{
CGError
err
;
...
...
@@ -1346,8 +1354,7 @@ int macdrv_err_on;
clippingCursor
=
TRUE
;
cursorClipRect
=
rect
;
if
([
NSApp
isActive
])
[
self
activateCursorClipping
];
[
self
updateCursorClippingState
];
return
TRUE
;
}
...
...
@@ -1358,8 +1365,8 @@ int macdrv_err_on;
if
(
err
!=
kCGErrorSuccess
)
return
FALSE
;
[
self
deactivateCursorClipping
];
clippingCursor
=
FALSE
;
[
self
updateCursorClippingState
];
return
TRUE
;
}
...
...
@@ -2012,7 +2019,7 @@ int macdrv_err_on;
}
[
latentDisplayModes
removeAllObjects
];
[
self
activateCursorClipping
];
[
self
updateCursorClippingState
];
[
self
updateFullscreenWindows
];
[
self
adjustWindowLevels
:
YES
];
...
...
@@ -2056,6 +2063,8 @@ int macdrv_err_on;
macdrv_event
*
event
;
WineEventQueue
*
queue
;
[
self
updateCursorClippingState
];
[
self
invalidateGotFocusEvents
];
event
=
macdrv_create_event
(
APP_DEACTIVATED
,
nil
);
...
...
@@ -2123,8 +2132,6 @@ int macdrv_err_on;
-
(
void
)
applicationWillResignActive
:
(
NSNotification
*
)
notification
{
[
self
deactivateCursorClipping
];
[
self
adjustWindowLevels
:
NO
];
}
...
...
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