-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
Unexpose DisplayServer::window_set_window_event_callback
#84638
Conversation
Overwriting this function led to problematic behavior, that is impossible to reimplement from GDScript. It is possible to listen to the events, by overwriting `Window._notification`, so an alternative to this exposed function is available.
0cef9a5
to
bab654a
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.
So I asked @reduz about this:
Since we identified a number of methods which interfere with Window and should only be used by someone who really knows what they're doing, I think it might indeed be best to put a clear disclaimer in the docs for each of those, but keep them exposed so we don't break compatibility. #81830 shows that some users were actually using this one at least. |
Documentation only alternative, for discussion: #84669 My understanding is that these methods could be used to create and manage windows (but not Window nodes!) directly on the DisplayServer. Like RenderingServer can be used to create canvas items (and not CanvasItem nodes), etc. So using these methods on an existing Window node's ID is risky, but they can be used for something more low level. |
The user of that issue was happy with the workaround (using _notification), so I wouldn't count them as "actually using" this functionality. |
Superseded by #84669. |
Overwriting this function led to problematic behavior, that is impossible to reimplement from GDScript.
It is possible to listen to the events, by overwriting
Window._notification
, so an alternative to this exposed function is available.This PR is based on this discussion in RC and on an overview of potential DisplayServer function interferences by bruvzg.
resolve #81830
If additional DisplayServer functions should be unexposed, let me known and i will adjust this PR.