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
189da79a
Commit
189da79a
authored
Apr 15, 2022
by
Jacek Caban
Committed by
Alexandre Julliard
May 02, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
win32u: Move NtUserDeleteMenu implementation from user32.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
dc0d16f1
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
39 additions
and
28 deletions
+39
-28
mdi.c
dlls/user32/mdi.c
+3
-3
menu.c
dlls/user32/menu.c
+3
-23
user32.spec
dlls/user32/user32.spec
+1
-1
menu.c
dlls/win32u/menu.c
+19
-0
syscall.c
dlls/win32u/syscall.c
+1
-0
win32u.spec
dlls/win32u/win32u.spec
+1
-1
syscall.h
dlls/wow64win/syscall.h
+1
-0
user.c
dlls/wow64win/user.c
+9
-0
ntuser.h
include/ntuser.h
+1
-0
No files found.
dlls/user32/mdi.c
View file @
189da79a
...
...
@@ -945,11 +945,11 @@ static BOOL MDI_RestoreFrameMenu( HWND frame, HWND hChild )
}
/* close */
DeleteMenu
(
menu
,
SC_CLOSE
,
MF_BYCOMMAND
);
NtUserDeleteMenu
(
menu
,
SC_CLOSE
,
MF_BYCOMMAND
);
/* restore */
DeleteMenu
(
menu
,
SC_RESTORE
,
MF_BYCOMMAND
);
NtUserDeleteMenu
(
menu
,
SC_RESTORE
,
MF_BYCOMMAND
);
/* minimize */
DeleteMenu
(
menu
,
SC_MINIMIZE
,
MF_BYCOMMAND
);
NtUserDeleteMenu
(
menu
,
SC_MINIMIZE
,
MF_BYCOMMAND
);
DrawMenuBar
(
frame
);
...
...
dlls/user32/menu.c
View file @
189da79a
...
...
@@ -410,7 +410,7 @@ static HMENU MENU_GetSysMenu( HWND hWnd, HMENU hPopupMenu )
if
(
hPopupMenu
)
{
if
(
GetClassLongW
(
hWnd
,
GCL_STYLE
)
&
CS_NOCLOSE
)
DeleteMenu
(
hPopupMenu
,
SC_CLOSE
,
MF_BYCOMMAND
);
NtUserDeleteMenu
(
hPopupMenu
,
SC_CLOSE
,
MF_BYCOMMAND
);
InsertMenuW
(
hMenu
,
-
1
,
MF_SYSMENU
|
MF_POPUP
|
MF_BYPOSITION
,
(
UINT_PTR
)
hPopupMenu
,
NULL
);
...
...
@@ -3540,7 +3540,7 @@ BOOL WINAPI ChangeMenuA( HMENU hMenu, UINT pos, LPCSTR data,
TRACE
(
"menu=%p pos=%d data=%p id=%08x flags=%08x
\n
"
,
hMenu
,
pos
,
data
,
id
,
flags
);
if
(
flags
&
MF_APPEND
)
return
AppendMenuA
(
hMenu
,
flags
&
~
MF_APPEND
,
id
,
data
);
if
(
flags
&
MF_DELETE
)
return
DeleteMenu
(
hMenu
,
pos
,
flags
&
~
MF_DELETE
);
if
(
flags
&
MF_DELETE
)
return
NtUserDeleteMenu
(
hMenu
,
pos
,
flags
&
~
MF_DELETE
);
if
(
flags
&
MF_CHANGE
)
return
ModifyMenuA
(
hMenu
,
pos
,
flags
&
~
MF_CHANGE
,
id
,
data
);
if
(
flags
&
MF_REMOVE
)
return
NtUserRemoveMenu
(
hMenu
,
...
...
@@ -3560,7 +3560,7 @@ BOOL WINAPI ChangeMenuW( HMENU hMenu, UINT pos, LPCWSTR data,
TRACE
(
"menu=%p pos=%d data=%p id=%08x flags=%08x
\n
"
,
hMenu
,
pos
,
data
,
id
,
flags
);
if
(
flags
&
MF_APPEND
)
return
AppendMenuW
(
hMenu
,
flags
&
~
MF_APPEND
,
id
,
data
);
if
(
flags
&
MF_DELETE
)
return
DeleteMenu
(
hMenu
,
pos
,
flags
&
~
MF_DELETE
);
if
(
flags
&
MF_DELETE
)
return
NtUserDeleteMenu
(
hMenu
,
pos
,
flags
&
~
MF_DELETE
);
if
(
flags
&
MF_CHANGE
)
return
ModifyMenuW
(
hMenu
,
pos
,
flags
&
~
MF_CHANGE
,
id
,
data
);
if
(
flags
&
MF_REMOVE
)
return
NtUserRemoveMenu
(
hMenu
,
...
...
@@ -3825,26 +3825,6 @@ BOOL WINAPI AppendMenuW( HMENU hMenu, UINT flags,
}
/**********************************************************************
* DeleteMenu (USER32.@)
*/
BOOL
WINAPI
DeleteMenu
(
HMENU
hMenu
,
UINT
id
,
UINT
flags
)
{
POPUPMENU
*
menu
;
UINT
pos
;
if
(
!
(
menu
=
find_menu_item
(
hMenu
,
id
,
flags
,
&
pos
)))
return
FALSE
;
if
(
menu
->
items
[
pos
].
fType
&
MF_POPUP
)
NtUserDestroyMenu
(
menu
->
items
[
pos
].
hSubMenu
);
NtUserRemoveMenu
(
menu
->
obj
.
handle
,
pos
,
flags
|
MF_BYPOSITION
);
release_menu_ptr
(
menu
);
return
TRUE
;
}
/*******************************************************************
* ModifyMenuW (USER32.@)
*/
...
...
dlls/user32/user32.spec
View file @
189da79a
...
...
@@ -153,7 +153,7 @@
@ stdcall DefWindowProcA(long long long long)
@ stdcall DefWindowProcW(long long long long)
@ stdcall DeferWindowPos(long long long long long long long long)
@ stdcall DeleteMenu(long long long)
@ stdcall DeleteMenu(long long long)
NtUserDeleteMenu
@ stdcall DeregisterShellHookWindow (long)
@ stdcall DestroyAcceleratorTable(long) NtUserDestroyAcceleratorTable
@ stdcall DestroyCaret()
...
...
dlls/win32u/menu.c
View file @
189da79a
...
...
@@ -977,6 +977,25 @@ BOOL WINAPI NtUserRemoveMenu( HMENU handle, UINT id, UINT flags )
}
/**********************************************************************
* NtUserDeleteMenu (win32u.@)
*/
BOOL
WINAPI
NtUserDeleteMenu
(
HMENU
handle
,
UINT
id
,
UINT
flags
)
{
POPUPMENU
*
menu
;
UINT
pos
;
if
(
!
(
menu
=
find_menu_item
(
handle
,
id
,
flags
,
&
pos
)))
return
FALSE
;
if
(
menu
->
items
[
pos
].
fType
&
MF_POPUP
)
NtUserDestroyMenu
(
menu
->
items
[
pos
].
hSubMenu
);
NtUserRemoveMenu
(
menu
->
obj
.
handle
,
pos
,
flags
|
MF_BYPOSITION
);
release_menu_ptr
(
menu
);
return
TRUE
;
}
/**********************************************************************
* NtUserSetMenuContextHelpId (win32u.@)
*/
BOOL
WINAPI
NtUserSetMenuContextHelpId
(
HMENU
handle
,
DWORD
id
)
...
...
dlls/win32u/syscall.c
View file @
189da79a
...
...
@@ -114,6 +114,7 @@ static void * const syscalls[] =
NtUserCreateAcceleratorTable
,
NtUserCreateDesktopEx
,
NtUserCreateWindowStation
,
NtUserDeleteMenu
,
NtUserDestroyAcceleratorTable
,
NtUserFindExistingCursorIcon
,
NtUserFindWindowEx
,
...
...
dlls/win32u/win32u.spec
View file @
189da79a
...
...
@@ -824,7 +824,7 @@
@ stdcall NtUserDeferWindowPosAndBand(long long long long long long long long long long)
@ stub NtUserDelegateCapturePointers
@ stub NtUserDelegateInput
@ st
ub NtUserDeleteMenu
@ st
dcall -syscall NtUserDeleteMenu(long long long)
@ stub NtUserDeleteWindowGroup
@ stdcall -syscall NtUserDestroyAcceleratorTable(long)
@ stub NtUserDestroyActivationGroup
...
...
dlls/wow64win/syscall.h
View file @
189da79a
...
...
@@ -101,6 +101,7 @@
SYSCALL_ENTRY( NtUserCreateAcceleratorTable ) \
SYSCALL_ENTRY( NtUserCreateDesktopEx ) \
SYSCALL_ENTRY( NtUserCreateWindowStation ) \
SYSCALL_ENTRY( NtUserDeleteMenu ) \
SYSCALL_ENTRY( NtUserDestroyAcceleratorTable ) \
SYSCALL_ENTRY( NtUserFindExistingCursorIcon ) \
SYSCALL_ENTRY( NtUserFindWindowEx ) \
...
...
dlls/wow64win/user.c
View file @
189da79a
...
...
@@ -669,6 +669,15 @@ NTSTATUS WINAPI wow64_NtUserCheckMenuItem( UINT *args )
return
NtUserCheckMenuItem
(
handle
,
id
,
flags
);
}
NTSTATUS
WINAPI
wow64_NtUserDeleteMenu
(
UINT
*
args
)
{
HMENU
menu
=
get_handle
(
&
args
);
UINT
id
=
get_ulong
(
&
args
);
UINT
flags
=
get_ulong
(
&
args
);
return
NtUserDeleteMenu
(
menu
,
id
,
flags
);
}
NTSTATUS
WINAPI
wow64_NtUserGetMenuItemRect
(
UINT
*
args
)
{
HWND
hwnd
=
get_handle
(
&
args
);
...
...
include/ntuser.h
View file @
189da79a
...
...
@@ -487,6 +487,7 @@ HWINSTA WINAPI NtUserCreateWindowStation( OBJECT_ATTRIBUTES *attr, ACCESS_MASK m
ULONG
arg4
,
ULONG
arg5
,
ULONG
arg6
,
ULONG
arg7
);
HDWP
WINAPI
NtUserDeferWindowPosAndBand
(
HDWP
hdwp
,
HWND
hwnd
,
HWND
after
,
INT
x
,
INT
y
,
INT
cx
,
INT
cy
,
UINT
flags
,
UINT
unk1
,
UINT
unk2
);
BOOL
WINAPI
NtUserDeleteMenu
(
HMENU
menu
,
UINT
id
,
UINT
flags
);
BOOL
WINAPI
NtUserDestroyAcceleratorTable
(
HACCEL
handle
);
BOOL
WINAPI
NtUserDestroyCursor
(
HCURSOR
cursor
,
ULONG
arg
);
BOOL
WINAPI
NtUserDestroyMenu
(
HMENU
menu
);
...
...
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