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
8bca1b29
Commit
8bca1b29
authored
Aug 27, 2018
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Scale coordinates in ClipCursor() based on DPI awareness.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
910f3ed4
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
1 deletion
+20
-1
cursoricon.c
dlls/user32/cursoricon.c
+20
-1
No files found.
dlls/user32/cursoricon.c
View file @
8bca1b29
...
@@ -2116,12 +2116,22 @@ HCURSOR WINAPI GetCursor(void)
...
@@ -2116,12 +2116,22 @@ HCURSOR WINAPI GetCursor(void)
*/
*/
BOOL
WINAPI
DECLSPEC_HOTPATCH
ClipCursor
(
const
RECT
*
rect
)
BOOL
WINAPI
DECLSPEC_HOTPATCH
ClipCursor
(
const
RECT
*
rect
)
{
{
UINT
dpi
;
BOOL
ret
;
BOOL
ret
;
RECT
new_rect
;
RECT
new_rect
;
TRACE
(
"Clipping to %s
\n
"
,
wine_dbgstr_rect
(
rect
)
);
TRACE
(
"Clipping to %s
\n
"
,
wine_dbgstr_rect
(
rect
)
);
if
(
rect
&&
(
rect
->
left
>
rect
->
right
||
rect
->
top
>
rect
->
bottom
))
return
FALSE
;
if
(
rect
)
{
if
(
rect
->
left
>
rect
->
right
||
rect
->
top
>
rect
->
bottom
)
return
FALSE
;
if
((
dpi
=
get_thread_dpi
()))
{
new_rect
=
map_dpi_rect
(
*
rect
,
dpi
,
get_monitor_dpi
(
MonitorFromRect
(
rect
,
MONITOR_DEFAULTTOPRIMARY
)));
rect
=
&
new_rect
;
}
}
SERVER_START_REQ
(
set_cursor
)
SERVER_START_REQ
(
set_cursor
)
{
{
...
@@ -2155,6 +2165,8 @@ BOOL WINAPI DECLSPEC_HOTPATCH ClipCursor( const RECT *rect )
...
@@ -2155,6 +2165,8 @@ BOOL WINAPI DECLSPEC_HOTPATCH ClipCursor( const RECT *rect )
*/
*/
BOOL
WINAPI
DECLSPEC_HOTPATCH
GetClipCursor
(
RECT
*
rect
)
BOOL
WINAPI
DECLSPEC_HOTPATCH
GetClipCursor
(
RECT
*
rect
)
{
{
DPI_AWARENESS_CONTEXT
context
;
UINT
dpi
;
BOOL
ret
;
BOOL
ret
;
if
(
!
rect
)
return
FALSE
;
if
(
!
rect
)
return
FALSE
;
...
@@ -2171,6 +2183,13 @@ BOOL WINAPI DECLSPEC_HOTPATCH GetClipCursor( RECT *rect )
...
@@ -2171,6 +2183,13 @@ BOOL WINAPI DECLSPEC_HOTPATCH GetClipCursor( RECT *rect )
}
}
}
}
SERVER_END_REQ
;
SERVER_END_REQ
;
if
(
ret
&&
(
dpi
=
get_thread_dpi
()))
{
context
=
SetThreadDpiAwarenessContext
(
DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE
);
*
rect
=
map_dpi_rect
(
*
rect
,
get_monitor_dpi
(
MonitorFromRect
(
rect
,
MONITOR_DEFAULTTOPRIMARY
)),
dpi
);
SetThreadDpiAwarenessContext
(
context
);
}
return
ret
;
return
ret
;
}
}
...
...
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