From: Jacek Caban jacek@codeweavers.com
--- dlls/user32/sysparams.c | 44 +++-------------------------------------- dlls/user32/win.h | 7 ------- 2 files changed, 3 insertions(+), 48 deletions(-)
diff --git a/dlls/user32/sysparams.c b/dlls/user32/sysparams.c index 36b166c627c..46b85c0b102 100644 --- a/dlls/user32/sysparams.c +++ b/dlls/user32/sysparams.c @@ -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 ) ); } @@ -720,31 +707,6 @@ static POINT point_phys_to_win_dpi( HWND hwnd, POINT pt ) return map_dpi_point( pt, get_win_monitor_dpi( hwnd ), GetDpiForWindow( hwnd )); }
-/********************************************************************** - * 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.@) */ diff --git a/dlls/user32/win.h b/dlls/user32/win.h index ffd4f37d5f0..9c61d5ce0a3 100644 --- a/dlls/user32/win.h +++ b/dlls/user32/win.h @@ -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;