Page 1 of 1

ContextMenu and Tooltip stays unclosed even when the window is deactivated

Posted: 25 Mar 2019, 09:46
by nikobarli
Hi,

When we show ContextMenu or Tooltip, and we click other window (thus deactivating the current Noesis window), the ContextMenu or Tooltip stays afloat (not closed).

Is there any way to fix this behavior ?

thanks.

Re: ContextMenu and Tooltip stays unclosed even when the window is deactivated

Posted: 25 Mar 2019, 13:09
by sfernandez
This is a bug, could you please report it in our bugtracker?
A tricky workaround could be to inject a fake mouse click at (-1,-1) in the View before doing the Deactivate, could you try that?

Re: ContextMenu and Tooltip stays unclosed even when the window is deactivated

Posted: 27 Mar 2019, 06:30
by nikobarli
Thanks. I filed the issue here: https://www.noesisengine.com/bugs/view.php?id=1438

Yes, the workaround is working as far as I can tell (I am sending LButtonDown at -1,-1).
But, isn't it dangerous to send fake mouse event, because it may interfere with the real events ?

Re: ContextMenu and Tooltip stays unclosed even when the window is deactivated

Posted: 27 Mar 2019, 11:05
by sfernandez
But, isn't it dangerous to send fake mouse event, because it may interfere with the real events ?
It won't do any harm here as you are deactivating the window and all mouse state will be reset, but consider this only as a temporal workaround, the right solution is fixing Noesis code to correctly close the menus and tooltips.