[PATCH] user32: Keep tracking if we just created the menu.

Zebediah Figura z.figura12 at gmail.com
Thu Jun 1 08:27:22 CDT 2017


On 06/01/2017 02:51 AM, Huw Davies wrote:
> On Wed, May 31, 2017 at 04:13:42PM -0500, Zebediah Figura wrote:
>> On 05/31/2017 03:30 PM, Huw Davies wrote:
>>> On Wed, May 31, 2017 at 02:34:06PM -0500, Zebediah Figura wrote:
>>>> Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
>>>> ---
>>>>   dlls/user32/menu.c | 3 +++
>>>>   1 file changed, 3 insertions(+)
>>>>
>>>> diff --git a/dlls/user32/menu.c b/dlls/user32/menu.c
>>>> index a65f01eaa5..c52b723f76 100644
>>>> --- a/dlls/user32/menu.c
>>>> +++ b/dlls/user32/menu.c
>>>> @@ -2597,7 +2597,10 @@ static BOOL MENU_ButtonDown( MTRACKER* pmt, HMENU hPtMenu, UINT wFlags )
>>>>               /* If the popup menu is not already "popped" */
>>>>               if (!(ptmenu->items[pos].fState & MF_MOUSESELECT))
>>>> +            {
>>>>                   pmt->hCurrentMenu = MENU_ShowSubPopup( pmt->hOwnerWnd, hPtMenu, FALSE, wFlags );
>>>> +                return TRUE;
>>>> +            }
>>>>           }
>>>>           /* A click on an item or anywhere on a popup keeps tracking going */
>>>
>>> So under what conditions does the if statement directly below this
>>> hunk not get triggered?
>>>
>>> Huw.
>>>
>>
>> When we clicked outside the menu (hPtMenu == NULL), or when we clicked on
>> the menu bar outside of a menu (hPtMenu != NULL, but ht == border && not a
>> popup). I might be missing something, so if anything in particular looks
>> problematic, please let me know.
> 
> I'm confused.  If one clicks on the menu bar outside of a menu, I'd expect
> the tracking to stop.  What exactly are you trying to fix?  Can this be
> seen using Wine's notepad?
> 
> Thanks,
> Huw.
> 

The problem is that the menu which appears on clicking the title bar, 
and contains elements such as minimize/restore/move/etc., is destroyed 
as soon as it is created. To replicate this, start notepad (or anything 
else) in a virtual window, then try to click the window icon in the 
upper left hand corner.



More information about the wine-devel mailing list