-
-
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 Modal Dialog with Embedded Game #102247
Fix Modal Dialog with Embedded Game #102247
Conversation
149f218
to
93aba07
Compare
I just pushed a fix to prevent the game window to keep the focus when hitting a breakpoint in the script editor. This issue happens only when this PR is merged with #102251 from my testing. |
It is still possible to get modal dialog completely under the main window or between main and embedded windows, by quickly and repeatedly clicking on embedded window and other part of the main window in the alternating manner. But modal dialog will get itself back on top after another click, so it's not completely unusable. |
93aba07
to
f2a42be
Compare
After a rebase, I was able to take advantage of the new timer that calls From my tests, this fixes the issue and makes the code clearer. Also, I fixed an issue when the user minimizes the dialog and focus the game process. Before, the editor was refocused, but the dialog was not restored. |
f2a42be
to
a9e06b8
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.
Seems to be working as expected, dialogs consistently stay on top of embedded window.
Thanks! |
The idea to fix the embedded process to go in front of a modal popup is to simply refocus the modal when the embedded process get the focus when it a modal window exists.
I found some code that was not useful anymore. The issue that section was trying to solve was replaced some time ago by
_check_focused_process_id
:Also,
EmbeddedProcess::_check_mouse_over
did not work as expected because of the addition oflast_updated_embedded_process_focused
a while ago. It did not refocused the embedded game like the 2D and 3D views do when the user mouse over. It's now fixed.Tested on Windows 11 and Linux Ubuntu 24.10