Page 1 of 1

Release focus from control

Posted: Sunday 23rd October 2022 5:35am
by Technopeasant
Hello,

I was adding mouse control to my latest game project and using the grab command to ensure that the player does not accidentally minimize the window when the mouse is not over it. This works well, however I need to know a way to get it to release the focus when the player is killed. The Gambas Wiki only mentions that the grab is ended when the user presses the esc key. Is there anyway to force this release in code?

https://gambaswiki.org/wiki/comp/gb.qt4/control/grab