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
224a8fc2
Commit
224a8fc2
authored
Jul 28, 2022
by
Jacek Caban
Committed by
Alexandre Julliard
Aug 05, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
win32u: Introduce NtUserGetWindowSysSubMenu.
And use it for MDI client implementation.
parent
c4c3e9fe
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
25 additions
and
11 deletions
+25
-11
mdi.c
dlls/user32/mdi.c
+4
-11
menu.c
dlls/win32u/menu.c
+11
-0
win32u_private.h
dlls/win32u/win32u_private.h
+1
-0
window.c
dlls/win32u/window.c
+3
-0
ntuser.h
include/ntuser.h
+6
-0
No files found.
dlls/user32/mdi.c
View file @
224a8fc2
...
...
@@ -1359,17 +1359,12 @@ LRESULT WINAPI DefFrameProcW( HWND hwnd, HWND hwndMDIClient,
{
/* control menu is between the frame system menu and
* the first entry of menu bar */
WND
*
wndPtr
=
WIN_GetPtr
(
hwnd
);
if
(
(
wParam
==
VK_LEFT
&&
GetMenu
(
hwnd
)
==
next_menu
->
hmenuIn
)
||
(
wParam
==
VK_RIGHT
&&
GetSubMenu
(
wndPtr
->
hSysMenu
,
0
)
==
next_menu
->
hmenuIn
)
)
if
((
wParam
==
VK_LEFT
&&
GetMenu
(
hwnd
)
==
next_menu
->
hmenuIn
)
||
(
wParam
==
VK_RIGHT
&&
NtUserGetWindowSysSubMenu
(
hwnd
)
==
next_menu
->
hmenuIn
))
{
WIN_ReleasePtr
(
wndPtr
);
wndPtr
=
WIN_GetPtr
(
ci
->
hwndActiveChild
);
next_menu
->
hmenuNext
=
GetSubMenu
(
wndPtr
->
hSysMenu
,
0
);
next_menu
->
hmenuNext
=
NtUserGetWindowSysSubMenu
(
ci
->
hwndActiveChild
);
next_menu
->
hwndNext
=
ci
->
hwndActiveChild
;
}
WIN_ReleasePtr
(
wndPtr
);
}
return
0
;
}
...
...
@@ -1551,9 +1546,7 @@ LRESULT WINAPI DefMDIChildProcW( HWND hwnd, UINT message,
if
(
wParam
==
VK_LEFT
)
/* switch to frame system menu */
{
WND
*
wndPtr
=
WIN_GetPtr
(
parent
);
next_menu
->
hmenuNext
=
GetSubMenu
(
wndPtr
->
hSysMenu
,
0
);
WIN_ReleasePtr
(
wndPtr
);
next_menu
->
hmenuNext
=
NtUserGetWindowSysSubMenu
(
parent
);
}
if
(
wParam
==
VK_RIGHT
)
/* to frame menu bar */
{
...
...
dlls/win32u/menu.c
View file @
224a8fc2
...
...
@@ -1619,6 +1619,17 @@ BOOL WINAPI NtUserSetSystemMenu( HWND hwnd, HMENU menu )
return
TRUE
;
}
HMENU
get_window_sys_sub_menu
(
HWND
hwnd
)
{
WND
*
win
;
HMENU
ret
;
if
(
!
(
win
=
get_win_ptr
(
hwnd
))
||
win
==
WND_OTHER_PROCESS
||
win
==
WND_DESKTOP
)
return
0
;
ret
=
win
->
hSysMenu
;
release_win_ptr
(
win
);
return
get_sub_menu
(
ret
,
0
);
}
/**********************************************************************
* NtUserSetMenuDefaultItem (win32u.@)
*/
...
...
dlls/win32u/win32u_private.h
View file @
224a8fc2
...
...
@@ -289,6 +289,7 @@ extern UINT get_menu_bar_height( HWND hwnd, UINT width, INT org_x, INT org_y ) D
extern
BOOL
get_menu_info
(
HMENU
handle
,
MENUINFO
*
info
)
DECLSPEC_HIDDEN
;
extern
INT
get_menu_item_count
(
HMENU
handle
)
DECLSPEC_HIDDEN
;
extern
UINT
get_menu_state
(
HMENU
handle
,
UINT
item_id
,
UINT
flags
)
DECLSPEC_HIDDEN
;
extern
HMENU
get_window_sys_sub_menu
(
HWND
hwnd
)
DECLSPEC_HIDDEN
;
extern
BOOL
is_menu
(
HMENU
handle
)
DECLSPEC_HIDDEN
;
extern
HWND
is_menu_active
(
void
)
DECLSPEC_HIDDEN
;
extern
LRESULT
popup_menu_window_proc
(
HWND
hwnd
,
UINT
message
,
WPARAM
wparam
,
...
...
dlls/win32u/window.c
View file @
224a8fc2
...
...
@@ -5419,6 +5419,9 @@ ULONG_PTR WINAPI NtUserCallHwnd( HWND hwnd, DWORD code )
case
NtUserCallHwnd_GetWindowInputContext
:
return
HandleToUlong
(
get_window_input_context
(
hwnd
));
case
NtUserCallHwnd_GetWindowSysSubMenu
:
return
HandleToUlong
(
get_window_sys_sub_menu
(
hwnd
));
case
NtUserCallHwnd_GetWindowTextLength
:
return
get_server_window_text
(
hwnd
,
NULL
,
0
);
...
...
include/ntuser.h
View file @
224a8fc2
...
...
@@ -1105,6 +1105,7 @@ enum
NtUserCallHwnd_GetWindowContextHelpId
,
NtUserCallHwnd_GetWindowDpiAwarenessContext
,
NtUserCallHwnd_GetWindowInputContext
,
NtUserCallHwnd_GetWindowSysSubMenu
,
NtUserCallHwnd_GetWindowTextLength
,
NtUserCallHwnd_IsWindow
,
NtUserCallHwnd_IsWindowEnabled
,
...
...
@@ -1163,6 +1164,11 @@ static inline HIMC NtUserGetWindowInputContext( HWND hwnd )
return
UlongToHandle
(
NtUserCallHwnd
(
hwnd
,
NtUserCallHwnd_GetWindowInputContext
));
}
static
inline
HMENU
NtUserGetWindowSysSubMenu
(
HWND
hwnd
)
{
return
UlongToHandle
(
NtUserCallHwnd
(
hwnd
,
NtUserCallHwnd_GetWindowSysSubMenu
));
}
static
inline
INT
NtUserGetWindowTextLength
(
HWND
hwnd
)
{
return
NtUserCallHwnd
(
hwnd
,
NtUserCallHwnd_GetWindowTextLength
);
...
...
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