Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
07f2cc9d
Commit
07f2cc9d
authored
Jun 15, 2022
by
Jacek Caban
Committed by
Alexandre Julliard
Jun 15, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
win32u: Move process default layout handling from user32.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
parent
6f3ed5fd
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
30 additions
and
16 deletions
+30
-16
class.c
dlls/user32/class.c
+4
-0
win.c
dlls/user32/win.c
+4
-16
sysparams.c
dlls/win32u/sysparams.c
+8
-0
win32u_private.h
dlls/win32u/win32u_private.h
+1
-0
window.c
dlls/win32u/window.c
+1
-0
ntuser.h
include/ntuser.h
+12
-0
No files found.
dlls/user32/class.c
View file @
07f2cc9d
...
...
@@ -309,6 +309,8 @@ static void load_uxtheme(void)
*/
BOOL
WINAPI
User32RegisterBuiltinClasses
(
const
struct
win_hook_params
*
params
,
ULONG
size
)
{
DWORD
layout
;
register_builtin
(
&
BUTTON_builtin_class
);
register_builtin
(
&
COMBO_builtin_class
);
register_builtin
(
&
COMBOLBOX_builtin_class
);
...
...
@@ -322,6 +324,8 @@ BOOL WINAPI User32RegisterBuiltinClasses( const struct win_hook_params *params,
register_builtin
(
&
STATIC_builtin_class
);
register_builtin
(
&
IME_builtin_class
);
GetProcessDefaultLayout
(
&
layout
);
/* make sure that process layout is initialized */
/* Load uxtheme.dll so that standard scrollbars and dialogs are hooked for theming support */
load_uxtheme
();
return
TRUE
;
...
...
dlls/user32/win.c
View file @
07f2cc9d
...
...
@@ -36,8 +36,6 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
win
);
static
DWORD
process_layout
=
~
0u
;
/***********************************************************************
* get_user_handle_ptr
...
...
@@ -626,15 +624,6 @@ HWND WIN_CreateWindowEx( CREATESTRUCTW *cs, LPCWSTR className, HINSTANCE module,
}
}
/* FIXME: move to win32u */
if
(
!
cs
->
hwndParent
&&
className
!=
(
const
WCHAR
*
)
DESKTOP_CLASS_ATOM
&&
(
IS_INTRESOURCE
(
className
)
||
wcsicmp
(
className
,
L"Message"
)))
{
DWORD
layout
;
GetProcessDefaultLayout
(
&
layout
);
if
(
layout
&
LAYOUT_RTL
)
cs
->
dwExStyle
|=
WS_EX_LAYOUTRTL
;
}
menu
=
cs
->
hMenu
;
if
(
!
menu
&&
info
.
lpszMenuName
&&
(
cs
->
style
&
(
WS_CHILD
|
WS_POPUP
))
!=
WS_CHILD
)
menu
=
LoadMenuW
(
cs
->
hInstance
,
info
.
lpszMenuName
);
...
...
@@ -1610,7 +1599,8 @@ BOOL WINAPI GetProcessDefaultLayout( DWORD *layout )
SetLastError
(
ERROR_NOACCESS
);
return
FALSE
;
}
if
(
process_layout
==
~
0u
)
*
layout
=
NtUserGetProcessDefaultLayout
();
if
(
*
layout
==
~
0u
)
{
WCHAR
*
str
,
buffer
[
MAX_PATH
];
DWORD
i
,
version_layout
=
0
;
...
...
@@ -1640,9 +1630,8 @@ BOOL WINAPI GetProcessDefaultLayout( DWORD *layout )
done
:
HeapFree
(
GetProcessHeap
(),
0
,
data
);
process_layout
=
version_layout
;
NtUserSetProcessDefaultLayout
(
*
layout
=
version_layout
)
;
}
*
layout
=
process_layout
;
return
TRUE
;
}
...
...
@@ -1654,8 +1643,7 @@ BOOL WINAPI GetProcessDefaultLayout( DWORD *layout )
*/
BOOL
WINAPI
SetProcessDefaultLayout
(
DWORD
layout
)
{
process_layout
=
layout
;
return
TRUE
;
return
NtUserSetProcessDefaultLayout
(
layout
);
}
#ifdef _WIN64
...
...
dlls/win32u/sysparams.c
View file @
07f2cc9d
...
...
@@ -360,6 +360,7 @@ union sysparam_all_entry
static
UINT
system_dpi
;
static
RECT
work_area
;
DWORD
process_layout
=
~
0u
;
static
HDC
display_dc
;
static
pthread_mutex_t
display_dc_lock
=
PTHREAD_MUTEX_INITIALIZER
;
...
...
@@ -4714,6 +4715,9 @@ ULONG_PTR WINAPI NtUserCallNoParam( ULONG code )
case
NtUserCallNoParam_GetInputState
:
return
get_input_state
();
case
NtUserCallNoParam_GetProcessDefaultLayout
:
return
process_layout
;
case
NtUserCallNoParam_ReleaseCapture
:
return
release_capture
();
...
...
@@ -4805,6 +4809,10 @@ ULONG_PTR WINAPI NtUserCallOneParam( ULONG_PTR arg, ULONG code )
case
NtUserCallOneParam_SetCaretBlinkTime
:
return
set_caret_blink_time
(
arg
);
case
NtUserCallOneParam_SetProcessDefaultLayout
:
process_layout
=
arg
;
return
TRUE
;
/* temporary exports */
case
NtUserCallHooks
:
{
...
...
dlls/win32u/win32u_private.h
View file @
07f2cc9d
...
...
@@ -424,6 +424,7 @@ extern LRESULT send_message_timeout( HWND hwnd, UINT msg, WPARAM wparam, LPARAM
/* sysparams.c */
extern
BOOL
enable_thunk_lock
DECLSPEC_HIDDEN
;
extern
DWORD
process_layout
DECLSPEC_HIDDEN
;
extern
HBRUSH
get_55aa_brush
(
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
;
...
...
dlls/win32u/window.c
View file @
07f2cc9d
...
...
@@ -5126,6 +5126,7 @@ HWND WINAPI NtUserCreateWindowEx( DWORD ex_style, UNICODE_STRING *class_name,
(
class_name
->
Length
!=
sizeof
(
messageW
)
||
wcsnicmp
(
class_name
->
Buffer
,
messageW
,
ARRAYSIZE
(
messageW
)
)))
{
if
(
process_layout
&
LAYOUT_RTL
)
cs
.
dwExStyle
|=
WS_EX_LAYOUTRTL
;
parent
=
get_desktop_window
();
}
}
...
...
include/ntuser.h
View file @
07f2cc9d
...
...
@@ -725,6 +725,7 @@ enum
NtUserCallNoParam_GetDesktopWindow
,
NtUserCallNoParam_GetDialogBaseUnits
,
NtUserCallNoParam_GetInputState
,
NtUserCallNoParam_GetProcessDefaultLayout
,
NtUserCallNoParam_ReleaseCapture
,
/* temporary exports */
NtUserExitingThread
,
...
...
@@ -751,6 +752,11 @@ static inline BOOL NtUserGetInputState(void)
return
NtUserCallNoParam
(
NtUserCallNoParam_GetInputState
);
}
static
inline
DWORD
NtUserGetProcessDefaultLayout
(
void
)
{
return
NtUserCallNoParam
(
NtUserCallNoParam_GetProcessDefaultLayout
);
}
static
inline
BOOL
NtUserReleaseCapture
(
void
)
{
return
NtUserCallNoParam
(
NtUserCallNoParam_ReleaseCapture
);
...
...
@@ -780,6 +786,7 @@ enum
NtUserCallOneParam_MessageBeep
,
NtUserCallOneParam_RealizePalette
,
NtUserCallOneParam_SetCaretBlinkTime
,
NtUserCallOneParam_SetProcessDefaultLayout
,
/* temporary exports */
NtUserCallHooks
,
NtUserGetDeskPattern
,
...
...
@@ -898,6 +905,11 @@ static inline UINT NtUserRealizePalette( HDC hdc )
return
NtUserCallOneParam
(
HandleToUlong
(
hdc
),
NtUserCallOneParam_RealizePalette
);
}
static
inline
UINT
NtUserSetProcessDefaultLayout
(
DWORD
layout
)
{
return
NtUserCallOneParam
(
layout
,
NtUserCallOneParam_SetProcessDefaultLayout
);
}
/* NtUserCallTwoParam codes, not compatible with Windows */
enum
{
...
...
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