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
d2d715b2
Commit
d2d715b2
authored
May 01, 2022
by
Jacek Caban
Committed by
Alexandre Julliard
May 02, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
win32u: Move NtUserSetSystemMenu implementation from user32.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
4604c455
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
25 additions
and
30 deletions
+25
-30
menu.c
dlls/user32/menu.c
+0
-18
user32.spec
dlls/user32/user32.spec
+1
-1
user_main.c
dlls/user32/user_main.c
+0
-1
gdiobj.c
dlls/win32u/gdiobj.c
+1
-0
menu.c
dlls/win32u/menu.c
+15
-8
ntuser_private.h
dlls/win32u/ntuser_private.h
+0
-1
win32u.spec
dlls/win32u/win32u.spec
+1
-1
win32u_private.h
dlls/win32u/win32u_private.h
+1
-0
wrappers.c
dlls/win32u/wrappers.c
+6
-0
No files found.
dlls/user32/menu.c
View file @
d2d715b2
...
@@ -3925,24 +3925,6 @@ HMENU WINAPI CreateMenu(void)
...
@@ -3925,24 +3925,6 @@ HMENU WINAPI CreateMenu(void)
}
}
/*******************************************************************
* SetSystemMenu (USER32.@)
*/
BOOL
WINAPI
SetSystemMenu
(
HWND
hwnd
,
HMENU
hMenu
)
{
WND
*
wndPtr
=
WIN_GetPtr
(
hwnd
);
if
(
wndPtr
&&
wndPtr
!=
WND_OTHER_PROCESS
&&
wndPtr
!=
WND_DESKTOP
)
{
if
(
wndPtr
->
hSysMenu
)
NtUserDestroyMenu
(
wndPtr
->
hSysMenu
);
wndPtr
->
hSysMenu
=
MENU_GetSysMenu
(
hwnd
,
hMenu
);
WIN_ReleasePtr
(
wndPtr
);
return
TRUE
;
}
return
FALSE
;
}
/**********************************************************************
/**********************************************************************
* GetMenu (USER32.@)
* GetMenu (USER32.@)
*/
*/
...
...
dlls/user32/user32.spec
View file @
d2d715b2
...
@@ -707,7 +707,7 @@
...
@@ -707,7 +707,7 @@
@ stdcall SetSysColors(long ptr ptr) NtUserSetSysColors
@ stdcall SetSysColors(long ptr ptr) NtUserSetSysColors
@ stdcall SetSysColorsTemp(ptr ptr long)
@ stdcall SetSysColorsTemp(ptr ptr long)
@ stdcall SetSystemCursor(long long)
@ stdcall SetSystemCursor(long long)
@ stdcall SetSystemMenu(long long)
@ stdcall SetSystemMenu(long long)
NtUserSetSystemMenu
@ stdcall SetSystemTimer(long long long ptr)
@ stdcall SetSystemTimer(long long long ptr)
@ stdcall SetTaskmanWindow (long)
@ stdcall SetTaskmanWindow (long)
@ stdcall SetThreadDesktop(long) NtUserSetThreadDesktop
@ stdcall SetThreadDesktop(long) NtUserSetThreadDesktop
...
...
dlls/user32/user_main.c
View file @
d2d715b2
...
@@ -164,7 +164,6 @@ static const struct user_callbacks user_funcs =
...
@@ -164,7 +164,6 @@ static const struct user_callbacks user_funcs =
EndMenu
,
EndMenu
,
ImmProcessKey
,
ImmProcessKey
,
ImmTranslateMessage
,
ImmTranslateMessage
,
SetSystemMenu
,
free_win_ptr
,
free_win_ptr
,
MENU_GetSysMenu
,
MENU_GetSysMenu
,
MENU_IsMenuActive
,
MENU_IsMenuActive
,
...
...
dlls/win32u/gdiobj.c
View file @
d2d715b2
...
@@ -1212,6 +1212,7 @@ static struct unix_funcs unix_funcs =
...
@@ -1212,6 +1212,7 @@ static struct unix_funcs unix_funcs =
NtUserSetMenu
,
NtUserSetMenu
,
NtUserSetParent
,
NtUserSetParent
,
NtUserSetSysColors
,
NtUserSetSysColors
,
NtUserSetSystemMenu
,
NtUserSetWindowLong
,
NtUserSetWindowLong
,
NtUserSetWindowLongPtr
,
NtUserSetWindowLongPtr
,
NtUserSetWindowPos
,
NtUserSetWindowPos
,
...
...
dlls/win32u/menu.c
View file @
d2d715b2
...
@@ -466,14 +466,6 @@ BOOL WINAPI NtUserDestroyMenu( HMENU handle )
...
@@ -466,14 +466,6 @@ BOOL WINAPI NtUserDestroyMenu( HMENU handle )
}
}
/*******************************************************************
/*******************************************************************
* NtUserSetSystemMenu (win32u.@)
*/
BOOL
WINAPI
NtUserSetSystemMenu
(
HWND
hwnd
,
HMENU
menu
)
{
return
user_callbacks
&&
user_callbacks
->
pSetSystemMenu
(
hwnd
,
menu
);
}
/*******************************************************************
* set_window_menu
* set_window_menu
*
*
* Helper for NtUserSetMenu that does not call NtUserSetWindowPos.
* Helper for NtUserSetMenu that does not call NtUserSetWindowPos.
...
@@ -1073,6 +1065,21 @@ HMENU WINAPI NtUserGetSystemMenu( HWND hwnd, BOOL revert )
...
@@ -1073,6 +1065,21 @@ HMENU WINAPI NtUserGetSystemMenu( HWND hwnd, BOOL revert )
}
}
/**********************************************************************
/**********************************************************************
* NtUserSetSystemMenu (win32u.@)
*/
BOOL
WINAPI
NtUserSetSystemMenu
(
HWND
hwnd
,
HMENU
menu
)
{
WND
*
win
=
get_win_ptr
(
hwnd
);
if
(
!
win
||
win
==
WND_OTHER_PROCESS
||
win
==
WND_DESKTOP
)
return
FALSE
;
if
(
win
->
hSysMenu
)
NtUserDestroyMenu
(
win
->
hSysMenu
);
win
->
hSysMenu
=
user_callbacks
?
user_callbacks
->
get_sys_menu
(
hwnd
,
menu
)
:
NULL
;
release_win_ptr
(
win
);
return
TRUE
;
}
/**********************************************************************
* NtUserSetMenuDefaultItem (win32u.@)
* NtUserSetMenuDefaultItem (win32u.@)
*/
*/
BOOL
WINAPI
NtUserSetMenuDefaultItem
(
HMENU
handle
,
UINT
item
,
UINT
bypos
)
BOOL
WINAPI
NtUserSetMenuDefaultItem
(
HMENU
handle
,
UINT
item
,
UINT
bypos
)
...
...
dlls/win32u/ntuser_private.h
View file @
d2d715b2
...
@@ -37,7 +37,6 @@ struct user_callbacks
...
@@ -37,7 +37,6 @@ struct user_callbacks
BOOL
(
WINAPI
*
pEndMenu
)(
void
);
BOOL
(
WINAPI
*
pEndMenu
)(
void
);
BOOL
(
WINAPI
*
pImmProcessKey
)(
HWND
,
HKL
,
UINT
,
LPARAM
,
DWORD
);
BOOL
(
WINAPI
*
pImmProcessKey
)(
HWND
,
HKL
,
UINT
,
LPARAM
,
DWORD
);
BOOL
(
WINAPI
*
pImmTranslateMessage
)(
HWND
,
UINT
,
WPARAM
,
LPARAM
);
BOOL
(
WINAPI
*
pImmTranslateMessage
)(
HWND
,
UINT
,
WPARAM
,
LPARAM
);
BOOL
(
WINAPI
*
pSetSystemMenu
)(
HWND
hwnd
,
HMENU
menu
);
void
(
CDECL
*
free_win_ptr
)(
struct
tagWND
*
win
);
void
(
CDECL
*
free_win_ptr
)(
struct
tagWND
*
win
);
HMENU
(
CDECL
*
get_sys_menu
)(
HWND
hwnd
,
HMENU
popup
);
HMENU
(
CDECL
*
get_sys_menu
)(
HWND
hwnd
,
HMENU
popup
);
HWND
(
CDECL
*
is_menu_active
)(
void
);
HWND
(
CDECL
*
is_menu_active
)(
void
);
...
...
dlls/win32u/win32u.spec
View file @
d2d715b2
...
@@ -1229,7 +1229,7 @@
...
@@ -1229,7 +1229,7 @@
@ stub NtUserSetShellWindowEx
@ stub NtUserSetShellWindowEx
@ stdcall NtUserSetSysColors(long ptr ptr)
@ stdcall NtUserSetSysColors(long ptr ptr)
@ stub NtUserSetSystemCursor
@ stub NtUserSetSystemCursor
@ st
ub NtUserSetSystemMenu
@ st
dcall NtUserSetSystemMenu(long long)
@ stdcall -syscall NtUserSetSystemTimer(long long long)
@ stdcall -syscall NtUserSetSystemTimer(long long long)
@ stub NtUserSetTargetForResourceBrokering
@ stub NtUserSetTargetForResourceBrokering
@ stdcall -syscall NtUserSetThreadDesktop(long)
@ stdcall -syscall NtUserSetThreadDesktop(long)
...
...
dlls/win32u/win32u_private.h
View file @
d2d715b2
...
@@ -282,6 +282,7 @@ struct unix_funcs
...
@@ -282,6 +282,7 @@ struct unix_funcs
BOOL
(
WINAPI
*
pNtUserSetMenu
)(
HWND
hwnd
,
HMENU
menu
);
BOOL
(
WINAPI
*
pNtUserSetMenu
)(
HWND
hwnd
,
HMENU
menu
);
HWND
(
WINAPI
*
pNtUserSetParent
)(
HWND
hwnd
,
HWND
parent
);
HWND
(
WINAPI
*
pNtUserSetParent
)(
HWND
hwnd
,
HWND
parent
);
BOOL
(
WINAPI
*
pNtUserSetSysColors
)(
INT
count
,
const
INT
*
colors
,
const
COLORREF
*
values
);
BOOL
(
WINAPI
*
pNtUserSetSysColors
)(
INT
count
,
const
INT
*
colors
,
const
COLORREF
*
values
);
BOOL
(
WINAPI
*
pNtUserSetSystemMenu
)(
HWND
hwnd
,
HMENU
menu
);
LONG
(
WINAPI
*
pNtUserSetWindowLong
)(
HWND
hwnd
,
INT
offset
,
LONG
newval
,
BOOL
ansi
);
LONG
(
WINAPI
*
pNtUserSetWindowLong
)(
HWND
hwnd
,
INT
offset
,
LONG
newval
,
BOOL
ansi
);
LONG_PTR
(
WINAPI
*
pNtUserSetWindowLongPtr
)(
HWND
hwnd
,
INT
offset
,
LONG_PTR
newval
,
BOOL
ansi
);
LONG_PTR
(
WINAPI
*
pNtUserSetWindowLongPtr
)(
HWND
hwnd
,
INT
offset
,
LONG_PTR
newval
,
BOOL
ansi
);
BOOL
(
WINAPI
*
pNtUserSetWindowPos
)(
HWND
hwnd
,
HWND
after
,
INT
x
,
INT
y
,
INT
cx
,
INT
cy
,
UINT
flags
);
BOOL
(
WINAPI
*
pNtUserSetWindowPos
)(
HWND
hwnd
,
HWND
after
,
INT
x
,
INT
y
,
INT
cx
,
INT
cy
,
UINT
flags
);
...
...
dlls/win32u/wrappers.c
View file @
d2d715b2
...
@@ -1185,6 +1185,12 @@ BOOL WINAPI NtUserSetSysColors( INT count, const INT *colors, const COLORREF *va
...
@@ -1185,6 +1185,12 @@ BOOL WINAPI NtUserSetSysColors( INT count, const INT *colors, const COLORREF *va
return
unix_funcs
->
pNtUserSetSysColors
(
count
,
colors
,
values
);
return
unix_funcs
->
pNtUserSetSysColors
(
count
,
colors
,
values
);
}
}
BOOL
WINAPI
NtUserSetSystemMenu
(
HWND
hwnd
,
HMENU
menu
)
{
if
(
!
unix_funcs
)
return
FALSE
;
return
unix_funcs
->
pNtUserSetSystemMenu
(
hwnd
,
menu
);
}
LONG
WINAPI
NtUserSetWindowLong
(
HWND
hwnd
,
INT
offset
,
LONG
newval
,
BOOL
ansi
)
LONG
WINAPI
NtUserSetWindowLong
(
HWND
hwnd
,
INT
offset
,
LONG
newval
,
BOOL
ansi
)
{
{
if
(
!
unix_funcs
)
return
0
;
if
(
!
unix_funcs
)
return
0
;
...
...
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