mirror of
git://source.winehq.org/git/wine.git
synced 2024-07-21 13:14:09 +00:00
win32u: Store DPI awareness in ntuser_thread_info.
This commit is contained in:
parent
ed693f5b32
commit
f390b5b884
|
@ -888,7 +888,7 @@ UINT WINAPI GetDpiForSystem(void)
|
|||
*/
|
||||
DPI_AWARENESS_CONTEXT WINAPI GetThreadDpiAwarenessContext(void)
|
||||
{
|
||||
struct user_thread_info *info = get_user_thread_info();
|
||||
struct ntuser_thread_info *info = NtUserGetThreadInfo();
|
||||
|
||||
if (info->dpi_awareness) return ULongToHandle( info->dpi_awareness );
|
||||
return UlongToHandle( (NtUserGetProcessDpiAwarenessContext( GetCurrentProcess() ) & 3 ) | 0x10 );
|
||||
|
@ -899,7 +899,7 @@ DPI_AWARENESS_CONTEXT WINAPI GetThreadDpiAwarenessContext(void)
|
|||
*/
|
||||
DPI_AWARENESS_CONTEXT WINAPI SetThreadDpiAwarenessContext( DPI_AWARENESS_CONTEXT context )
|
||||
{
|
||||
struct user_thread_info *info = get_user_thread_info();
|
||||
struct ntuser_thread_info *info = NtUserGetThreadInfo();
|
||||
DPI_AWARENESS prev, val = GetAwarenessFromDpiAwarenessContext( context );
|
||||
|
||||
if (val == DPI_AWARENESS_INVALID)
|
||||
|
|
|
@ -129,7 +129,6 @@ struct user_thread_info
|
|||
WORD hook_unicode; /* Is current hook unicode? */
|
||||
HHOOK hook; /* Current hook */
|
||||
UINT active_hooks; /* Bitmap of active hooks */
|
||||
DPI_AWARENESS dpi_awareness; /* DPI awareness */
|
||||
INPUT_MESSAGE_SOURCE msg_source; /* Message source for current message */
|
||||
struct received_message_info *receive_info; /* Message being currently received */
|
||||
struct wm_char_mapping_data *wmchar_data; /* Data for WM_CHAR mappings */
|
||||
|
|
|
@ -1608,7 +1608,7 @@ UINT get_win_monitor_dpi( HWND hwnd )
|
|||
*/
|
||||
DPI_AWARENESS get_thread_dpi_awareness(void)
|
||||
{
|
||||
struct user_thread_info *info = get_user_thread_info();
|
||||
struct ntuser_thread_info *info = NtUserGetThreadInfo();
|
||||
ULONG_PTR context = info->dpi_awareness;
|
||||
|
||||
if (!context) context = NtUserGetProcessDpiAwarenessContext( NULL );
|
||||
|
@ -1677,7 +1677,7 @@ static DPI_AWARENESS get_awareness_from_dpi_awareness_context( DPI_AWARENESS_CON
|
|||
*/
|
||||
DPI_AWARENESS_CONTEXT WINAPI SetThreadDpiAwarenessContext( DPI_AWARENESS_CONTEXT context )
|
||||
{
|
||||
struct user_thread_info *info = get_user_thread_info();
|
||||
struct ntuser_thread_info *info = NtUserGetThreadInfo();
|
||||
DPI_AWARENESS prev, val = get_awareness_from_dpi_awareness_context( context );
|
||||
|
||||
if (val == DPI_AWARENESS_INVALID)
|
||||
|
|
|
@ -61,14 +61,15 @@ enum
|
|||
/* TEB thread info, not compatible with Windows */
|
||||
struct ntuser_thread_info
|
||||
{
|
||||
void *driver_data; /* driver-specific data */
|
||||
DWORD message_time; /* value for GetMessageTime */
|
||||
DWORD message_pos; /* value for GetMessagePos */
|
||||
ULONG_PTR message_extra; /* value for GetMessageExtraInfo */
|
||||
HWND top_window; /* desktop window */
|
||||
HWND msg_window; /* HWND_MESSAGE parent window */
|
||||
HIMC default_imc; /* default input context */
|
||||
void *client_imm; /* client IMM thread info */
|
||||
void *driver_data; /* driver-specific data */
|
||||
DWORD message_time; /* value for GetMessageTime */
|
||||
DWORD message_pos; /* value for GetMessagePos */
|
||||
ULONG_PTR message_extra; /* value for GetMessageExtraInfo */
|
||||
HWND top_window; /* desktop window */
|
||||
HWND msg_window; /* HWND_MESSAGE parent window */
|
||||
DPI_AWARENESS dpi_awareness; /* DPI awareness */
|
||||
HIMC default_imc; /* default input context */
|
||||
void *client_imm; /* client IMM thread info */
|
||||
};
|
||||
|
||||
static inline struct ntuser_thread_info *NtUserGetThreadInfo(void)
|
||||
|
|
Loading…
Reference in a new issue