-
-
Notifications
You must be signed in to change notification settings - Fork 22k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix Embedded Game over expanded bottom panel #102921
base: master
Are you sure you want to change the base?
Fix Embedded Game over expanded bottom panel #102921
Conversation
e211796
to
3cd0773
Compare
Gave it a try, don't know about code but original issue is resolved and everything else looks good 🎉🚀 There is one thing I noticed while I was testing it, not sure if this is concern of this PR but became noticeable now:
mouse_captured.mp4
mouse_cant_go_beyond_game_c.mp4 |
Thanks for testing. It seems that the capture mouse is enable even if the game window is hidden and not focused. This should probably not happen, I'll the see what I can do about it. |
3cd0773
to
e376c6d
Compare
I fixed the mouse captured which was still active when the game window did not have the focus or was hidden. Turns out that it could happen without in the embedded mode with the right timing if the There was an issue with the new |
e376c6d
to
01fea85
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the reference, #91262 (macOS changes can be salvaged for WINDOW_FLAG_HIDDEN
support).
Also, some extra changes from aforementioned PR that probaly should be included (irrelevnat for embedding, but can cause issues since new flag is exposed):
- Suppress IME activation for hiddeen windows and
window_move_to_foreground
on X11. ShowWindow
is called in other places, and these should check for flag as well.
I was not able to reproduce the issue, so have not tested it.
gave it another try, mouse pointer isn't locked in editor anymore (when bottom panel is expanded) 🎉
|
The issue came from the fact that when the bottom panel is expanded, the embedded game must be started hidden. That was not supported by Godot and the
DisplayServer
. I had to add a newHIDDEN
flag and a new--hidden
command line argument to start the game hidden. The new--hidden
argument is passed to the game on startup when the embedded control is hidden (aka the bottom panel is fully expanded).