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
51129752
Commit
51129752
authored
Apr 26, 2013
by
Ken Thomases
Committed by
Alexandre Julliard
Apr 26, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winemac: For SetCursorPos(), reset positions of pending mouse button and scroll events.
They are effectively deemed to have happened after the SetCursorPos().
parent
a6722029
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
1 deletion
+27
-1
cocoa_app.m
dlls/winemac.drv/cocoa_app.m
+2
-1
cocoa_event.h
dlls/winemac.drv/cocoa_event.h
+2
-0
cocoa_event.m
dlls/winemac.drv/cocoa_event.m
+23
-0
No files found.
dlls/winemac.drv/cocoa_app.m
View file @
51129752
...
...
@@ -1032,8 +1032,8 @@ int macdrv_err_on;
{
[
self
clipCursorLocation
:
&
pos
];
ret
=
[
self
warpCursorTo
:
&
pos
from
:
NULL
];
synthesizedLocation
=
pos
;
ret
=
[
self
warpCursorTo
:
&
synthesizedLocation
from
:
NULL
];
if
(
ret
)
{
// We want to discard mouse-move events that have already been
...
...
@@ -1076,6 +1076,7 @@ int macdrv_err_on;
[
queue
discardEventsMatchingMask
:
event_mask_for_type
(
MOUSE_MOVED
)
|
event_mask_for_type
(
MOUSE_MOVED_ABSOLUTE
)
forWindow
:
nil
];
[
queue
resetMouseEventPositions
:
pos
];
}
[
eventQueuesLock
unlock
];
}
...
...
dlls/winemac.drv/cocoa_event.h
View file @
51129752
...
...
@@ -42,6 +42,8 @@
-
(
BOOL
)
query
:(
macdrv_query
*
)
query
timeout
:(
NSTimeInterval
)
timeout
processEvents
:(
BOOL
)
processEvents
;
-
(
BOOL
)
query
:(
macdrv_query
*
)
query
timeout
:(
NSTimeInterval
)
timeout
;
-
(
void
)
resetMouseEventPositions
:(
CGPoint
)
pos
;
@end
void
OnMainThread
(
dispatch_block_t
block
);
...
...
dlls/winemac.drv/cocoa_event.m
View file @
51129752
...
...
@@ -280,6 +280,29 @@ static NSString* const WineEventQueueThreadDictionaryKey = @"WineEventQueueThrea
return
[
self
query
:
query
timeout
:
timeout
processEvents
:
FALSE
];
}
-
(
void
)
resetMouseEventPositions
:
(
CGPoint
)
pos
{
MacDrvEvent
*
event
;
[
eventsLock
lock
];
for
(
event
in
events
)
{
if
(
event
->
event
->
type
==
MOUSE_BUTTON
)
{
event
->
event
->
mouse_button
.
x
=
pos
.
x
;
event
->
event
->
mouse_button
.
y
=
pos
.
y
;
}
else
if
(
event
->
event
->
type
==
MOUSE_SCROLL
)
{
event
->
event
->
mouse_scroll
.
x
=
pos
.
x
;
event
->
event
->
mouse_scroll
.
y
=
pos
.
y
;
}
}
[
eventsLock
unlock
];
}
/***********************************************************************
* OnMainThread
...
...
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