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
aee9fa0e
Commit
aee9fa0e
authored
Jun 22, 2018
by
Fabian Maurer
Committed by
Alexandre Julliard
Jun 25, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Always release menu item in EnableMenuItem.
Signed-off-by:
Fabian Maurer
<
dark.shadow4@web.de
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
15215bd0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
18 deletions
+15
-18
menu.c
dlls/user32/menu.c
+15
-18
No files found.
dlls/user32/menu.c
View file @
aee9fa0e
...
...
@@ -3741,28 +3741,25 @@ BOOL WINAPI EnableMenuItem( HMENU hMenu, UINT id, UINT wFlags )
item
->
fState
^=
(
oldflags
^
wFlags
)
&
(
MF_GRAYED
|
MF_DISABLED
);
/* If the close item in the system menu change update the close button */
if
((
item
->
wID
==
SC_CLOSE
)
&&
(
oldflags
!=
wFlags
))
if
((
item
->
wID
==
SC_CLOSE
)
&&
(
oldflags
!=
wFlags
)
&&
menu
->
hSysMenuOwner
)
{
if
(
menu
->
hSysMenuOwner
)
{
RECT
rc
;
POPUPMENU
*
parentMenu
;
HWND
hwnd
;
RECT
rc
;
POPUPMENU
*
parentMenu
;
HWND
hwnd
;
/* Get the parent menu to access
*/
parentMenu
=
grab_menu_ptr
(
menu
->
hSysMenuOwner
);
release_menu_ptr
(
menu
);
if
(
!
parentMenu
)
return
(
UINT
)
-
1
;
/* Get the parent menu to access
*/
parentMenu
=
grab_menu_ptr
(
menu
->
hSysMenuOwner
);
release_menu_ptr
(
menu
);
if
(
!
parentMenu
)
return
(
UINT
)
-
1
;
hwnd
=
parentMenu
->
hWnd
;
release_menu_ptr
(
parentMenu
);
hwnd
=
parentMenu
->
hWnd
;
release_menu_ptr
(
parentMenu
);
/* Refresh the frame to reflect the change */
WIN_GetRectangles
(
hwnd
,
COORDS_CLIENT
,
&
rc
,
NULL
);
rc
.
bottom
=
0
;
RedrawWindow
(
hwnd
,
&
rc
,
0
,
RDW_FRAME
|
RDW_INVALIDATE
|
RDW_NOCHILDREN
);
}
/* Refresh the frame to reflect the change */
WIN_GetRectangles
(
hwnd
,
COORDS_CLIENT
,
&
rc
,
NULL
);
rc
.
bottom
=
0
;
RedrawWindow
(
hwnd
,
&
rc
,
0
,
RDW_FRAME
|
RDW_INVALIDATE
|
RDW_NOCHILDREN
);
}
else
release_menu_ptr
(
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