-
-
Notifications
You must be signed in to change notification settings - Fork 18.8k
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
Close focused Popup when the main window loses focus #91455
base: master
Are you sure you want to change the base?
Conversation
Your commit seems not to be linked to your GitHub account. See: Why are my commits linked to the wrong user? for more info. |
dfc8503
to
d32810f
Compare
This is supposed to be handled in Lines 107 to 111 in 06d105e
It also works correctly on Windows, and I can't find any dedicated code like this on Windows |
d32810f
to
5bb8b92
Compare
@AThousandShips Thanks for noticing! Email modified and commit signed!
Yeah, sounds logical. I tried to follow that route at first, but didn't reach to any conclusion. I'll give it another go |
This is indeed the necessary fix, this change would be breaking other things potentially, notice that this: godot/platform/linuxbsd/x11/display_server_x11.cpp Lines 4646 to 4651 in 06d105e
Has no equivalent in Probably something in this code that's broken: godot/platform/linuxbsd/x11/display_server_x11.cpp Lines 4280 to 4304 in 06d105e
Possibly related: |
Related to: #68447 |
@@ -380,6 +380,7 @@ class DisplayServerX11 : public DisplayServer { | |||
void _window_changed(XEvent *event); | |||
|
|||
public: | |||
bool close_top_popup(); |
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.
This function doesn't need to be public, so it would be better to make it private.
Private functions in this C++ code base are supposed to start with an underscore "_
".
Since the return value is not used, the function definition should be void
instead of bool
.
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.
The current solution is almost certainly not the right one so don't think this detail is something to fix at the moment
Fixes 91450
Important Note: I've just started checking out Godot's code like a week ago, so it's totally possible that I've failed to notice some unintended consequences of this change proposal. My idea was to close the top-most focused popup whenever the window loses focus.