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
39d615ee
Commit
39d615ee
authored
Aug 06, 2007
by
Jason Edmeades
Committed by
Alexandre Julliard
Aug 09, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Skip system menu entries when using keyboard.
parent
60833da9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
2 deletions
+38
-2
menu.c
dlls/user32/menu.c
+38
-2
No files found.
dlls/user32/menu.c
View file @
39d615ee
...
...
@@ -2668,9 +2668,39 @@ static void MENU_SetCapture( HWND hwnd )
static
LRESULT
MENU_DoNextMenu
(
MTRACKER
*
pmt
,
UINT
vk
)
{
POPUPMENU
*
menu
=
MENU_GetMenu
(
pmt
->
hTopMenu
);
BOOL
atEnd
=
FALSE
;
if
(
(
vk
==
VK_LEFT
&&
menu
->
FocusedItem
==
0
)
||
(
vk
==
VK_RIGHT
&&
menu
->
FocusedItem
==
menu
->
nItems
-
1
))
/* When skipping left, we need to do something special after the
first menu. */
if
(
vk
==
VK_LEFT
&&
menu
->
FocusedItem
==
0
)
{
atEnd
=
TRUE
;
}
/* When skipping right, for the non-system menu, we need to
handle the last non-special menu item (ie skip any window
icons such as MDI maximize, restore or close) */
else
if
((
vk
==
VK_RIGHT
)
&&
!
IS_SYSTEM_MENU
(
menu
))
{
int
i
=
menu
->
FocusedItem
+
1
;
while
(
i
<
(
menu
->
nItems
-
1
))
{
if
((
menu
->
items
[
i
].
wID
>=
SC_SIZE
&&
menu
->
items
[
i
].
wID
<=
SC_RESTORE
))
{
i
++
;
}
else
break
;
}
if
(
i
==
(
menu
->
nItems
-
1
))
{
atEnd
=
TRUE
;
}
}
/* When skipping right, we need to cater for the system menu */
else
if
((
vk
==
VK_RIGHT
)
&&
IS_SYSTEM_MENU
(
menu
))
{
if
(
menu
->
FocusedItem
==
(
menu
->
nItems
-
1
))
{
atEnd
=
TRUE
;
}
}
if
(
atEnd
)
{
MDINEXTMENU
next_menu
;
HMENU
hNewMenu
;
...
...
@@ -2699,6 +2729,12 @@ static LRESULT MENU_DoNextMenu( MTRACKER* pmt, UINT vk )
{
menu
=
MENU_GetMenu
(
hNewMenu
);
id
=
menu
->
nItems
-
1
;
/* Skip backwards over any system predefined icons,
eg. MDI close, restore etc icons */
while
((
id
>
0
)
&&
(
menu
->
items
[
id
].
wID
>=
SC_SIZE
&&
menu
->
items
[
id
].
wID
<=
SC_RESTORE
))
id
--
;
}
}
else
if
(
style
&
WS_SYSMENU
)
...
...
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