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
fd382909
Commit
fd382909
authored
Aug 26, 2022
by
Jacek Caban
Committed by
Alexandre Julliard
Aug 27, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Remove no longer used DPI functions.
parent
d6dce27e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
48 deletions
+3
-48
sysparams.c
dlls/user32/sysparams.c
+3
-41
win.h
dlls/user32/win.h
+0
-7
No files found.
dlls/user32/sysparams.c
View file @
fd382909
...
...
@@ -672,29 +672,16 @@ BOOL WINAPI EnumDisplaySettingsExW( const WCHAR *device, DWORD mode,
/**********************************************************************
* get_win_monitor_dpi
*/
UINT
get_win_monitor_dpi
(
HWND
hwnd
)
static
UINT
get_win_monitor_dpi
(
HWND
hwnd
)
{
/* FIXME: use the monitor DPI instead */
return
system_dpi
;
}
/**********************************************************************
* get_thread_dpi
*/
UINT
get_thread_dpi
(
void
)
{
switch
(
GetAwarenessFromDpiAwarenessContext
(
GetThreadDpiAwarenessContext
()
))
{
case
DPI_AWARENESS_UNAWARE
:
return
USER_DEFAULT_SCREEN_DPI
;
case
DPI_AWARENESS_SYSTEM_AWARE
:
return
system_dpi
;
default:
return
0
;
/* no scaling */
}
}
/**********************************************************************
* map_dpi_point
*/
POINT
map_dpi_point
(
POINT
pt
,
UINT
dpi_from
,
UINT
dpi_to
)
static
POINT
map_dpi_point
(
POINT
pt
,
UINT
dpi_from
,
UINT
dpi_to
)
{
if
(
dpi_from
&&
dpi_to
&&
dpi_from
!=
dpi_to
)
{
...
...
@@ -707,7 +694,7 @@ POINT map_dpi_point( POINT pt, UINT dpi_from, UINT dpi_to )
/**********************************************************************
* point_win_to_phys_dpi
*/
POINT
point_win_to_phys_dpi
(
HWND
hwnd
,
POINT
pt
)
static
POINT
point_win_to_phys_dpi
(
HWND
hwnd
,
POINT
pt
)
{
return
map_dpi_point
(
pt
,
GetDpiForWindow
(
hwnd
),
get_win_monitor_dpi
(
hwnd
)
);
}
...
...
@@ -721,31 +708,6 @@ static POINT point_phys_to_win_dpi( HWND hwnd, POINT pt )
}
/**********************************************************************
* map_dpi_rect
*/
RECT
map_dpi_rect
(
RECT
rect
,
UINT
dpi_from
,
UINT
dpi_to
)
{
if
(
dpi_from
&&
dpi_to
&&
dpi_from
!=
dpi_to
)
{
rect
.
left
=
MulDiv
(
rect
.
left
,
dpi_to
,
dpi_from
);
rect
.
top
=
MulDiv
(
rect
.
top
,
dpi_to
,
dpi_from
);
rect
.
right
=
MulDiv
(
rect
.
right
,
dpi_to
,
dpi_from
);
rect
.
bottom
=
MulDiv
(
rect
.
bottom
,
dpi_to
,
dpi_from
);
}
return
rect
;
}
/**********************************************************************
* rect_win_to_thread_dpi
*/
RECT
rect_win_to_thread_dpi
(
HWND
hwnd
,
RECT
rect
)
{
UINT
dpi
=
get_thread_dpi
();
if
(
!
dpi
)
dpi
=
get_win_monitor_dpi
(
hwnd
);
return
map_dpi_rect
(
rect
,
GetDpiForWindow
(
hwnd
),
dpi
);
}
/**********************************************************************
* SetProcessDpiAwarenessContext (USER32.@)
*/
BOOL
WINAPI
SetProcessDpiAwarenessContext
(
DPI_AWARENESS_CONTEXT
context
)
...
...
dlls/user32/win.h
View file @
fd382909
...
...
@@ -37,13 +37,6 @@ extern HDESK open_winstation_desktop( HWINSTA hwinsta, LPCWSTR name, DWORD flags
extern
void
WINPOS_ActivateOtherWindow
(
HWND
hwnd
)
DECLSPEC_HIDDEN
;
extern
UINT
get_win_monitor_dpi
(
HWND
hwnd
)
DECLSPEC_HIDDEN
;
extern
UINT
get_thread_dpi
(
void
)
DECLSPEC_HIDDEN
;
extern
POINT
map_dpi_point
(
POINT
pt
,
UINT
dpi_from
,
UINT
dpi_to
)
DECLSPEC_HIDDEN
;
extern
POINT
point_win_to_phys_dpi
(
HWND
hwnd
,
POINT
pt
)
DECLSPEC_HIDDEN
;
extern
RECT
map_dpi_rect
(
RECT
rect
,
UINT
dpi_from
,
UINT
dpi_to
)
DECLSPEC_HIDDEN
;
extern
RECT
rect_win_to_thread_dpi
(
HWND
hwnd
,
RECT
rect
)
DECLSPEC_HIDDEN
;
static
inline
void
mirror_rect
(
const
RECT
*
window_rect
,
RECT
*
rect
)
{
int
width
=
window_rect
->
right
-
window_rect
->
left
;
...
...
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