the problem is that when i clic the button it hides the panel but my cursor is still visible, i have to clic twice for it to dissapear.
…
i also have an event that gets called with the keyboard, this event shows the hidden panel and the cursor, i have the same problem as before but now i have to clic twice the button to hide the panel and then again another time to hide the cursor
For as long as the cursor is over a widget, it’s the widget that controls cursor’s visibility, not the controller. In your case, you’re hiding the Selection Panel of the Waiting widget. The cursor is still over the widget Waiting and it’s showing the cursor. Click outside of the widget after hiding, the cursor will disappear because the widget will lose focus (unless you made it full screen, that is).
Each widget can control the visibility of the cursor separately:
After asking the controller to hide it, ask the widget to do the same:
Seems to work fine here. Can you show the widget hierarchy and describe which element is misbehaving? And perhaps what you’re trying to achieve - it often helps with suggesting a tangible solution.