realesmedia
Topic Author
Posts: 85
Joined: 18 May 2016, 10:26

[C++] Hide context menu after focus inside

21 Aug 2017, 12:46

I create custom context menu on right mouse button.
When context menu shows I can close it by clicking outside of the context menu.
If I click on active elements (such as slider, buttons, checkitems) inside custom context menu I can't close it by clicking outside. How can I fix this behaviour?

I temporarily add OnMouseLeave event with next code:
menu->SetIsOpen(false);
but it crashed on Win7 in xaml view MouseMove().
 
User avatar
sfernandez
Site Admin
Posts: 3222
Joined: 22 Dec 2011, 19:20

Re: [C++] Hide context menu after focus inside

23 Aug 2017, 20:27

I was able to reproduce this bug, could you please report it in the bugtracker?
Thanks for reporting.

As a workaround try calling the following:
menu->GetMouse()->Capture(menu, CaptureMode_SubTree)
Let me know if it works correctly for you.
 
realesmedia
Topic Author
Posts: 85
Joined: 18 May 2016, 10:26

Re: [C++] Hide context menu after focus inside

24 Aug 2017, 09:15

could you please report it in the bugtracker?
Issue #1138 was created.

Who is online

Users browsing this forum: Ahrefs [Bot], Google [Bot] and 4 guests