Commit 50bbaf9d authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

win32u: Fix handling uninitialized process_layout.

parent 95791ea0
...@@ -375,7 +375,7 @@ union sysparam_all_entry ...@@ -375,7 +375,7 @@ union sysparam_all_entry
static UINT system_dpi; static UINT system_dpi;
static RECT work_area; static RECT work_area;
DWORD process_layout = ~0u; static DWORD process_layout = ~0u;
static HDC display_dc; static HDC display_dc;
static pthread_mutex_t display_dc_lock = PTHREAD_MUTEX_INITIALIZER; static pthread_mutex_t display_dc_lock = PTHREAD_MUTEX_INITIALIZER;
...@@ -1631,6 +1631,11 @@ DPI_AWARENESS get_thread_dpi_awareness(void) ...@@ -1631,6 +1631,11 @@ DPI_AWARENESS get_thread_dpi_awareness(void)
} }
} }
DWORD get_process_layout(void)
{
return process_layout == ~0u ? 0 : process_layout;
}
/********************************************************************** /**********************************************************************
* get_thread_dpi * get_thread_dpi
*/ */
......
...@@ -326,7 +326,6 @@ extern void track_scroll_bar( HWND hwnd, int scrollbar, POINT pt ) DECLSPEC_HIDD ...@@ -326,7 +326,6 @@ extern void track_scroll_bar( HWND hwnd, int scrollbar, POINT pt ) DECLSPEC_HIDD
/* sysparams.c */ /* sysparams.c */
extern BOOL enable_thunk_lock DECLSPEC_HIDDEN; extern BOOL enable_thunk_lock DECLSPEC_HIDDEN;
extern DWORD process_layout DECLSPEC_HIDDEN;
extern HBRUSH get_55aa_brush(void) DECLSPEC_HIDDEN; extern HBRUSH get_55aa_brush(void) DECLSPEC_HIDDEN;
extern DWORD get_dialog_base_units(void) DECLSPEC_HIDDEN; extern DWORD get_dialog_base_units(void) DECLSPEC_HIDDEN;
extern LONG get_char_dimensions( HDC hdc, TEXTMETRICW *metric, LONG *height ) DECLSPEC_HIDDEN; extern LONG get_char_dimensions( HDC hdc, TEXTMETRICW *metric, LONG *height ) DECLSPEC_HIDDEN;
...@@ -335,6 +334,7 @@ extern UINT get_monitor_dpi( HMONITOR monitor ) DECLSPEC_HIDDEN; ...@@ -335,6 +334,7 @@ extern UINT get_monitor_dpi( HMONITOR monitor ) DECLSPEC_HIDDEN;
extern BOOL get_monitor_info( HMONITOR handle, MONITORINFO *info ) DECLSPEC_HIDDEN; extern BOOL get_monitor_info( HMONITOR handle, MONITORINFO *info ) DECLSPEC_HIDDEN;
extern UINT get_win_monitor_dpi( HWND hwnd ) DECLSPEC_HIDDEN; extern UINT get_win_monitor_dpi( HWND hwnd ) DECLSPEC_HIDDEN;
extern RECT get_primary_monitor_rect( UINT dpi ) DECLSPEC_HIDDEN; extern RECT get_primary_monitor_rect( UINT dpi ) DECLSPEC_HIDDEN;
extern DWORD get_process_layout(void) DECLSPEC_HIDDEN;
extern COLORREF get_sys_color( int index ) DECLSPEC_HIDDEN; extern COLORREF get_sys_color( int index ) DECLSPEC_HIDDEN;
extern HBRUSH get_sys_color_brush( unsigned int index ) DECLSPEC_HIDDEN; extern HBRUSH get_sys_color_brush( unsigned int index ) DECLSPEC_HIDDEN;
extern HPEN get_sys_color_pen( unsigned int index ) DECLSPEC_HIDDEN; extern HPEN get_sys_color_pen( unsigned int index ) DECLSPEC_HIDDEN;
......
...@@ -5094,7 +5094,7 @@ HWND WINAPI NtUserCreateWindowEx( DWORD ex_style, UNICODE_STRING *class_name, ...@@ -5094,7 +5094,7 @@ HWND WINAPI NtUserCreateWindowEx( DWORD ex_style, UNICODE_STRING *class_name,
(class_name->Length != sizeof(messageW) || (class_name->Length != sizeof(messageW) ||
wcsnicmp( class_name->Buffer, messageW, ARRAYSIZE(messageW) ))) wcsnicmp( class_name->Buffer, messageW, ARRAYSIZE(messageW) )))
{ {
if (process_layout & LAYOUT_RTL) cs.dwExStyle |= WS_EX_LAYOUTRTL; if (get_process_layout() & LAYOUT_RTL) cs.dwExStyle |= WS_EX_LAYOUTRTL;
parent = get_desktop_window(); parent = get_desktop_window();
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment