-
-
Notifications
You must be signed in to change notification settings - Fork 18.9k
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
[DisplayServer] Add method to check if window transparency is supported and enabled. #91505
Conversation
091206c
to
4959119
Compare
To me, "is_window_transparency_enabled" reads like "is_window_transparency_currently_enabled" which might cause confusion. Maybe rename it to something like "is_window_transparency_supported"? |
The issue with this proposal is, IMO, that it clashes a bit too much with Perhaps |
I am not exactly sure how the display server handles transparency, but based on its name and description in the documentation: "Returns true if the window background can be made transparent", it seems like more of a "is this feature supported/available" rather than "is this feature enabled". Or at least it would seem that way had I looked at its documentation, although I may be misunderstanding what this function is for, or maybe the phrasing is just throwing me off. Edit: On second thought, I think this is just a phrasing issue. English is not my native language, so it was hard to understand. But I still think it should be renamed for clarity. |
Thanks! |
Fix build with `vulkan=no` and `d3d12=no` after #91505.
I know I'm late, but I'd like to support the idea of this being checked via I'm aware the new function added here checks if both supported and enabled. However, that's something that projects could check anyway via If this new function is really important as a shortcut (which I'm not very sure about), it could be implemented in such terms. |
@RandomShaper I like that idea too! The only issue is that, IMO, the use of that method is a bit ambiguous. I think that |
That's indeed how it's being used at the moment for the most part. However, the method is not described as not able to perform checks at runtime. We could maybe specify the method as being runtime-constant (instead of compile-time constant). |
Oh wow, I didn't know that. TBH, I'd be in favour. There are already a bunch other "dynamic" features that come to mind, especially for the Wayland platform, which is build extensively on global objects that theoretically could disappear and reappear at any moment. |
Adds method to check is transparency is usable, see #91333