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
76691853
Commit
76691853
authored
May 07, 2013
by
Ken Thomases
Committed by
Alexandre Julliard
May 07, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winemac: Extract application-level handling of mouse move events to a separate method.
parent
79ef449e
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
18 deletions
+22
-18
cocoa_app.m
dlls/winemac.drv/cocoa_app.m
+22
-18
No files found.
dlls/winemac.drv/cocoa_app.m
View file @
76691853
...
...
@@ -1134,23 +1134,7 @@ int macdrv_err_on;
return
TRUE
;
}
// Returns TRUE if the event was handled and caller should do nothing more
// with it. Returns FALSE if the caller should process it as normal and
// then call -didSendEvent:.
-
(
BOOL
)
handleEvent
:
(
NSEvent
*
)
anEvent
{
if
([
anEvent
type
]
==
NSFlagsChanged
)
self
.
lastFlagsChanged
=
anEvent
;
return
FALSE
;
}
-
(
void
)
didSendEvent
:
(
NSEvent
*
)
anEvent
{
NSEventType
type
=
[
anEvent
type
];
if
(
type
==
NSMouseMoved
||
type
==
NSLeftMouseDragged
||
type
==
NSRightMouseDragged
||
type
==
NSOtherMouseDragged
)
-
(
void
)
handleMouseMove
:
(
NSEvent
*
)
anEvent
{
WineWindow
*
targetWindow
;
...
...
@@ -1158,7 +1142,7 @@ int macdrv_err_on;
event indicates its window is the main window, even if the cursor is
over a different window. Find the actual WineWindow that is under the
cursor and post the event as being for that window. */
if
(
type
==
NSMouseMoved
)
if
([
anEvent
type
]
==
NSMouseMoved
)
{
CGPoint
cgpoint
=
CGEventGetLocation
([
anEvent
CGEvent
]);
NSPoint
point
=
[
self
flippedMouseLocation
:
NSPointFromCGPoint
(
cgpoint
)];
...
...
@@ -1198,6 +1182,26 @@ int macdrv_err_on;
lastTargetWindow
=
nil
;
}
}
// Returns TRUE if the event was handled and caller should do nothing more
// with it. Returns FALSE if the caller should process it as normal and
// then call -didSendEvent:.
-
(
BOOL
)
handleEvent
:
(
NSEvent
*
)
anEvent
{
if
([
anEvent
type
]
==
NSFlagsChanged
)
self
.
lastFlagsChanged
=
anEvent
;
return
FALSE
;
}
-
(
void
)
didSendEvent
:
(
NSEvent
*
)
anEvent
{
NSEventType
type
=
[
anEvent
type
];
if
(
type
==
NSMouseMoved
||
type
==
NSLeftMouseDragged
||
type
==
NSRightMouseDragged
||
type
==
NSOtherMouseDragged
)
{
[
self
handleMouseMove
:
anEvent
];
}
else
if
(
type
==
NSLeftMouseDown
||
type
==
NSLeftMouseUp
||
type
==
NSRightMouseDown
||
type
==
NSRightMouseUp
||
type
==
NSOtherMouseDown
||
type
==
NSOtherMouseUp
||
...
...
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