-
-
Notifications
You must be signed in to change notification settings - Fork 21.1k
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
Properly set window class in Wayland #92252
Conversation
18da6b8
to
5d1fed1
Compare
@@ -5501,7 +5501,7 @@ void DisplayServerWindows::tablet_set_current_driver(const String &p_driver) { | |||
} | |||
} | |||
|
|||
DisplayServerWindows::DisplayServerWindows(const String &p_rendering_driver, WindowMode p_mode, VSyncMode p_vsync_mode, uint32_t p_flags, const Vector2i *p_position, const Vector2i &p_resolution, int p_screen, Error &r_error) { | |||
DisplayServerWindows::DisplayServerWindows(const String &p_rendering_driver, WindowMode p_mode, VSyncMode p_vsync_mode, uint32_t p_flags, const Vector2i *p_position, const Vector2i &p_resolution, int p_screen, Context p_context, Error &r_error) { | |||
KeyMappingWindows::initialize(); |
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.
Note: Windows DisplayServer
do the similar stuff with a local check (was done for the same reason, AppID should be set before showing window), with this PR merged, it can be changed to use context
as well.
godot/platform/windows/display_server_windows.cpp
Line 5295 in 8e2141e
appname = "Godot.GodotEditor." + String(VERSION_BRANCH); |
godot/platform/windows/display_server_windows.cpp
Line 5766 in 8e2141e
appname = "Godot.GodotEditor." + String(VERSION_BRANCH); |
5d1fed1
to
f4219c2
Compare
f4219c2
to
a3769c0
Compare
Mh that's interesting. I had no idea rules had an "initial" set of properties. I'm not against the change, but I'm curious what stops people from using the non-initial window properties? |
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.
Anyways, the code looks nice and simple! Wayland/X11-side things look A-OK, but don't forget to also take into account bruvzg's review :)
Hi Riteo, In Hyprland, we have two types of window rules: static and dynamic. Static rules only take the initial properties, as they are executed when the window is instantiated. This is where I would select in which monitor I want to display the window, or whether I want it to be fullscreen or floating. Unfortunately, I cannot do that through dynamic rules, which read the current title and class. You can read more about it here: https://wiki.hyprland.org/Configuring/Window-Rules/. PS: You did amazing work with the Wayland display server. Thank you! |
Makes perfect sense, thanks for clarifying!
You're welcome :D There's still a lot to do and your testing and contribution is very appreciated! |
Thanks! |
When using the Wayland display server, the window is initialized before the class is set. This means that every window has the same initial class as the Editor, making it impossible to create rules in compositors to, for instance, set the game window to a different monitor (this is important, as in Wayland, it's not possible to choose a monitor through the application).
Example:
$ hyprctl clients
Master:
This build: