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
9b0fdc64
Commit
9b0fdc64
authored
Feb 24, 2013
by
Ken Thomases
Committed by
Alexandre Julliard
Feb 25, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winemac: Implement ClipCursor().
parent
5c933c89
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
40 additions
and
11 deletions
+40
-11
cocoa_app.h
dlls/winemac.drv/cocoa_app.h
+8
-0
cocoa_app.m
dlls/winemac.drv/cocoa_app.m
+0
-0
cocoa_window.m
dlls/winemac.drv/cocoa_window.m
+4
-11
macdrv_cocoa.h
dlls/winemac.drv/macdrv_cocoa.h
+1
-0
mouse.c
dlls/winemac.drv/mouse.c
+26
-0
winemac.drv.spec
dlls/winemac.drv/winemac.drv.spec
+1
-0
No files found.
dlls/winemac.drv/cocoa_app.h
View file @
9b0fdc64
...
...
@@ -59,7 +59,13 @@
NSTimer
*
cursorTimer
;
BOOL
cursorHidden
;
BOOL
clippingCursor
;
CGRect
cursorClipRect
;
CFMachPortRef
cursorClippingEventTap
;
NSMutableArray
*
warpRecords
;
CGPoint
synthesizedLocation
;
NSTimeInterval
lastSetCursorPositionTime
;
NSTimeInterval
lastEventTapEventTime
;
}
@property
(
nonatomic
)
CGEventSourceKeyboardType
keyboardType
;
...
...
@@ -79,6 +85,8 @@
-
(
void
)
keyboardSelectionDidChange
;
-
(
void
)
flipRect
:(
NSRect
*
)
rect
;
-
(
void
)
wineWindow
:(
WineWindow
*
)
window
ordered
:(
NSWindowOrderingMode
)
order
relativeTo
:(
WineWindow
*
)
otherWindow
;
...
...
dlls/winemac.drv/cocoa_app.m
View file @
9b0fdc64
This diff is collapsed.
Click to expand it.
dlls/winemac.drv/cocoa_window.m
View file @
9b0fdc64
...
...
@@ -144,8 +144,6 @@ static inline void fix_generic_modifiers_by_device(NSUInteger* modifiers)
@property
(
readwrite
,
nonatomic
)
NSInteger
levelWhenActive
;
+
(
void
)
flipRect
:(
NSRect
*
)
rect
;
@end
...
...
@@ -255,7 +253,7 @@ static inline void fix_generic_modifiers_by_device(NSUInteger* modifiers)
WineContentView
*
contentView
;
NSTrackingArea
*
trackingArea
;
[
self
flipRect
:
&
window_frame
];
[
NSApp
flipRect
:
&
window_frame
];
window
=
[[[
self
alloc
]
initWithContentRect
:
window_frame
styleMask
:
style_mask_for_features
(
wf
)
...
...
@@ -309,11 +307,6 @@ static inline void fix_generic_modifiers_by_device(NSUInteger* modifiers)
[
super
dealloc
];
}
+
(
void
)
flipRect
:
(
NSRect
*
)
rect
{
rect
->
origin
.
y
=
NSMaxY
([[[
NSScreen
screens
]
objectAtIndex
:
0
]
frame
])
-
NSMaxY
(
*
rect
);
}
-
(
void
)
adjustFeaturesForState
{
NSUInteger
style
=
normalStyleMask
;
...
...
@@ -524,7 +517,7 @@ static inline void fix_generic_modifiers_by_device(NSUInteger* modifiers)
/* Origin is (left, top) in a top-down space. Need to convert it to
(left, bottom) in a bottom-up space. */
[
[
self
class
]
flipRect
:
&
contentRect
];
[
NSApp
flipRect
:
&
contentRect
];
if
(
on_screen
)
{
...
...
@@ -1094,7 +1087,7 @@ static inline void fix_generic_modifiers_by_device(NSUInteger* modifiers)
macdrv_event
event
;
NSRect
frame
=
[
self
contentRectForFrameRect
:[
self
frame
]];
[
[
self
class
]
flipRect
:
&
frame
];
[
NSApp
flipRect
:
&
frame
];
/* Coalesce events by discarding any previous ones still in the queue. */
[
queue
discardEventsMatchingMask
:
event_mask_for_type
(
WINDOW_FRAME_CHANGED
)
...
...
@@ -1314,7 +1307,7 @@ void macdrv_get_cocoa_window_frame(macdrv_window w, CGRect* out_frame)
NSRect
frame
;
frame
=
[
window
contentRectForFrameRect
:[
window
frame
]];
[
[
window
class
]
flipRect
:
&
frame
];
[
NSApp
flipRect
:
&
frame
];
*
out_frame
=
NSRectToCGRect
(
frame
);
});
}
...
...
dlls/winemac.drv/macdrv_cocoa.h
View file @
9b0fdc64
...
...
@@ -122,6 +122,7 @@ extern void macdrv_beep(void) DECLSPEC_HIDDEN;
extern
void
macdrv_set_cursor
(
CFStringRef
name
,
CFArrayRef
frames
)
DECLSPEC_HIDDEN
;
extern
int
macdrv_get_cursor_position
(
CGPoint
*
pos
)
DECLSPEC_HIDDEN
;
extern
int
macdrv_set_cursor_position
(
CGPoint
pos
)
DECLSPEC_HIDDEN
;
extern
int
macdrv_clip_cursor
(
CGRect
rect
)
DECLSPEC_HIDDEN
;
/* display */
...
...
dlls/winemac.drv/mouse.c
View file @
9b0fdc64
...
...
@@ -736,6 +736,32 @@ void CDECL macdrv_DestroyCursorIcon(HCURSOR cursor)
/***********************************************************************
* ClipCursor (MACDRV.@)
*
* Set the cursor clipping rectangle.
*/
BOOL
CDECL
macdrv_ClipCursor
(
LPCRECT
clip
)
{
CGRect
rect
;
TRACE
(
"%s
\n
"
,
wine_dbgstr_rect
(
clip
));
if
(
clip
)
{
rect
=
CGRectMake
(
clip
->
left
,
clip
->
top
,
max
(
1
,
clip
->
right
-
clip
->
left
),
max
(
1
,
clip
->
bottom
-
clip
->
top
));
}
else
rect
=
CGRectInfinite
;
/* FIXME: This needs to be done not just in this process but in all of the
ones for this WINEPREFIX. Broadcast a message to do that. */
return
macdrv_clip_cursor
(
rect
);
}
/***********************************************************************
* GetCursorPos (MACDRV.@)
*/
BOOL
CDECL
macdrv_GetCursorPos
(
LPPOINT
pos
)
...
...
dlls/winemac.drv/winemac.drv.spec
View file @
9b0fdc64
...
...
@@ -7,6 +7,7 @@
@ cdecl ActivateKeyboardLayout(long long) macdrv_ActivateKeyboardLayout
@ cdecl Beep() macdrv_Beep
@ cdecl ChangeDisplaySettingsEx(ptr ptr long long long) macdrv_ChangeDisplaySettingsEx
@ cdecl ClipCursor(ptr) macdrv_ClipCursor
@ cdecl CreateDesktopWindow(long) macdrv_CreateDesktopWindow
@ cdecl CreateWindow(long) macdrv_CreateWindow
@ cdecl DestroyCursorIcon(long) macdrv_DestroyCursorIcon
...
...
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