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
352e24dc
Commit
352e24dc
authored
Aug 26, 2022
by
Jacek Caban
Committed by
Alexandre Julliard
Aug 27, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
win32u: Move NtUserLogicalToPerMonitorDPIPhysicalPoint implementation from user32.
parent
fd382909
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
34 additions
and
23 deletions
+34
-23
sysparams.c
dlls/user32/sysparams.c
+0
-21
user32.spec
dlls/user32/user32.spec
+1
-1
syscall.c
dlls/win32u/syscall.c
+1
-0
sysparams.c
dlls/win32u/sysparams.c
+21
-0
win32u.spec
dlls/win32u/win32u.spec
+1
-1
syscall.h
dlls/wow64win/syscall.h
+1
-0
user.c
dlls/wow64win/user.c
+8
-0
ntuser.h
include/ntuser.h
+1
-0
No files found.
dlls/user32/sysparams.c
View file @
352e24dc
...
...
@@ -692,14 +692,6 @@ static POINT map_dpi_point( POINT pt, UINT dpi_from, UINT dpi_to )
}
/**********************************************************************
* point_win_to_phys_dpi
*/
static
POINT
point_win_to_phys_dpi
(
HWND
hwnd
,
POINT
pt
)
{
return
map_dpi_point
(
pt
,
GetDpiForWindow
(
hwnd
),
get_win_monitor_dpi
(
hwnd
)
);
}
/**********************************************************************
* point_phys_to_win_dpi
*/
static
POINT
point_phys_to_win_dpi
(
HWND
hwnd
,
POINT
pt
)
...
...
@@ -880,19 +872,6 @@ DPI_AWARENESS_CONTEXT WINAPI SetThreadDpiAwarenessContext( DPI_AWARENESS_CONTEXT
}
/**********************************************************************
* LogicalToPhysicalPointForPerMonitorDPI (USER32.@)
*/
BOOL
WINAPI
LogicalToPhysicalPointForPerMonitorDPI
(
HWND
hwnd
,
POINT
*
pt
)
{
RECT
rect
;
if
(
!
GetWindowRect
(
hwnd
,
&
rect
))
return
FALSE
;
if
(
pt
->
x
<
rect
.
left
||
pt
->
y
<
rect
.
top
||
pt
->
x
>
rect
.
right
||
pt
->
y
>
rect
.
bottom
)
return
FALSE
;
*
pt
=
point_win_to_phys_dpi
(
hwnd
,
*
pt
);
return
TRUE
;
}
/**********************************************************************
* PhysicalToLogicalPointForPerMonitorDPI (USER32.@)
*/
BOOL
WINAPI
PhysicalToLogicalPointForPerMonitorDPI
(
HWND
hwnd
,
POINT
*
pt
)
...
...
dlls/user32/user32.spec
View file @
352e24dc
...
...
@@ -513,7 +513,7 @@
@ stdcall LockWindowUpdate(long) NtUserLockWindowUpdate
@ stdcall LockWorkStation()
@ stdcall LogicalToPhysicalPoint(long ptr)
@ stdcall LogicalToPhysicalPointForPerMonitorDPI(long ptr)
@ stdcall LogicalToPhysicalPointForPerMonitorDPI(long ptr)
NtUserLogicalToPerMonitorDPIPhysicalPoint
@ stdcall LookupIconIdFromDirectory(ptr long)
@ stdcall LookupIconIdFromDirectoryEx(ptr long long long long)
@ stub MBToWCSEx
...
...
dlls/win32u/syscall.c
View file @
352e24dc
...
...
@@ -218,6 +218,7 @@ static void * const syscalls[] =
NtUserIsClipboardFormatAvailable
,
NtUserKillTimer
,
NtUserLockWindowUpdate
,
NtUserLogicalToPerMonitorDPIPhysicalPoint
,
NtUserMapVirtualKeyEx
,
NtUserMenuItemFromPoint
,
NtUserMessageCall
,
...
...
dlls/win32u/sysparams.c
View file @
352e24dc
...
...
@@ -1721,6 +1721,14 @@ POINT map_dpi_point( POINT pt, UINT dpi_from, UINT dpi_to )
}
/**********************************************************************
* point_win_to_phys_dpi
*/
static
POINT
point_win_to_phys_dpi
(
HWND
hwnd
,
POINT
pt
)
{
return
map_dpi_point
(
pt
,
get_dpi_for_window
(
hwnd
),
get_win_monitor_dpi
(
hwnd
)
);
}
/**********************************************************************
* point_phys_to_win_dpi
*/
POINT
point_phys_to_win_dpi
(
HWND
hwnd
,
POINT
pt
)
...
...
@@ -2440,6 +2448,19 @@ BOOL WINAPI NtUserGetDpiForMonitor( HMONITOR monitor, UINT type, UINT *x, UINT *
return
TRUE
;
}
/**********************************************************************
* LogicalToPhysicalPointForPerMonitorDPI (win32u.@)
*/
BOOL
WINAPI
NtUserLogicalToPerMonitorDPIPhysicalPoint
(
HWND
hwnd
,
POINT
*
pt
)
{
RECT
rect
;
if
(
!
get_window_rect
(
hwnd
,
&
rect
,
get_thread_dpi
()
))
return
FALSE
;
if
(
pt
->
x
<
rect
.
left
||
pt
->
y
<
rect
.
top
||
pt
->
x
>
rect
.
right
||
pt
->
y
>
rect
.
bottom
)
return
FALSE
;
*
pt
=
point_win_to_phys_dpi
(
hwnd
,
*
pt
);
return
TRUE
;
}
/* retrieve the cached base keys for a given entry */
static
BOOL
get_base_keys
(
enum
parameter_key
index
,
HKEY
*
base_key
,
HKEY
*
volatile_key
)
{
...
...
dlls/win32u/win32u.spec
View file @
352e24dc
...
...
@@ -1067,7 +1067,7 @@
@ stub NtUserLockWindowStation
@ stdcall -syscall NtUserLockWindowUpdate(long)
@ stub NtUserLockWorkStation
@ st
ub NtUserLogicalToPerMonitorDPIPhysicalPoint
@ st
dcall -syscall NtUserLogicalToPerMonitorDPIPhysicalPoint(long ptr)
@ stub NtUserLogicalToPhysicalDpiPointForWindow
@ stub NtUserLogicalToPhysicalPoint
@ stub NtUserMNDragLeave
...
...
dlls/wow64win/syscall.h
View file @
352e24dc
...
...
@@ -204,6 +204,7 @@
SYSCALL_ENTRY( NtUserIsClipboardFormatAvailable ) \
SYSCALL_ENTRY( NtUserKillTimer ) \
SYSCALL_ENTRY( NtUserLockWindowUpdate ) \
SYSCALL_ENTRY( NtUserLogicalToPerMonitorDPIPhysicalPoint ) \
SYSCALL_ENTRY( NtUserMapVirtualKeyEx ) \
SYSCALL_ENTRY( NtUserMenuItemFromPoint ) \
SYSCALL_ENTRY( NtUserMessageCall ) \
...
...
dlls/wow64win/user.c
View file @
352e24dc
...
...
@@ -2665,6 +2665,14 @@ NTSTATUS WINAPI wow64_NtUserLockWindowUpdate( UINT *args )
return
NtUserLockWindowUpdate
(
hwnd
);
}
NTSTATUS
WINAPI
wow64_NtUserLogicalToPerMonitorDPIPhysicalPoint
(
UINT
*
args
)
{
HWND
hwnd
=
get_handle
(
&
args
);
POINT
*
pt
=
get_ptr
(
&
args
);
return
NtUserLogicalToPerMonitorDPIPhysicalPoint
(
hwnd
,
pt
);
}
NTSTATUS
WINAPI
wow64_NtUserMapVirtualKeyEx
(
UINT
*
args
)
{
UINT
code
=
get_ulong
(
&
args
);
...
...
include/ntuser.h
View file @
352e24dc
...
...
@@ -773,6 +773,7 @@ BOOL WINAPI NtUserInvalidateRect( HWND hwnd, const RECT *rect, BOOL erase );
BOOL
WINAPI
NtUserInvalidateRgn
(
HWND
hwnd
,
HRGN
hrgn
,
BOOL
erase
);
BOOL
WINAPI
NtUserKillTimer
(
HWND
hwnd
,
UINT_PTR
id
);
BOOL
WINAPI
NtUserLockWindowUpdate
(
HWND
hwnd
);
BOOL
WINAPI
NtUserLogicalToPerMonitorDPIPhysicalPoint
(
HWND
hwnd
,
POINT
*
pt
);
UINT
WINAPI
NtUserMapVirtualKeyEx
(
UINT
code
,
UINT
type
,
HKL
layout
);
INT
WINAPI
NtUserMenuItemFromPoint
(
HWND
hwnd
,
HMENU
handle
,
int
x
,
int
y
);
LRESULT
WINAPI
NtUserMessageCall
(
HWND
hwnd
,
UINT
msg
,
WPARAM
wparam
,
LPARAM
lparam
,
...
...
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