-
-
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
Godot 4.0.dev editor behaves weird while using i3wm (and maybe other tilling wm's) #37930
Comments
It's because of the refactor of the window backend: now every "subwindow" in Godot is it's own window, and i3wm tiles them like any other. Run Godot with |
It looks like it's properly setting them as floating but not keeping their sizes and positions. |
Nope, on tabbed mode it adds another tab with the popup as if it were a normal window. |
@ev1lbl0w Is there anything we can do about it? I wonder if we should detect tiling WMs and force single window mode by default in this case. |
I think we can set some window hints and hope the most popular tiling WM's abide to them. And if that's not the case, there's still the single window option that could be easily toggled (I think there was already an issue/request to make it toggable from the editor settings..?) |
So, after fiddling with the code for windows, I can't pinpoint the exact problem. In my setup (bspwm), the window seems to randomly work: sometimes it works fine, other times it becomes tiled, and fill the entire screen. I tried debugging and looking at But either way, I believe it's best for Godot to act as a single window for tilling WM's. To make Godot work well in this new scenario, I have to write some configs for it. And even them, they only apply to the current game/project I'm working on, and have to redo all them for other projects 😛 So, I agree with you @Calinou; it's probably best to detect a tilling WM and set Godot to single-window mode. But still retaining the option for floating docks (like Gimp). |
This exactly happens to me too! |
It looks like in this function it's creating the window then setting it's flags. Maybe i3wm is tiling the window before it knows it should have been floating? I'm really not sure, I'm very new to this.
|
In DWM, some dialogs/popups are working well, for example: project settings, editor settings and the exit confirmation. The problem seems to be with menu dialogs, which are not tiled but they take up to 60% of the screen. With DWM in floating mode, they spawn with correct size but in random positions. godot --single-window does not solve anything for me |
I got this from xprop: Menu (takes up 60% of the screen)WM_TRANSIENT_FOR(WINDOW): window id # 0x4200002 Exit confirmation (works well)WM_TRANSIENT_FOR(WINDOW): window id # 0x4200002 Settings (works well)WM_TRANSIENT_FOR(WINDOW): window id # 0x4200002 |
That's probably because the flag is only passed to the first instance, which is the project manager if you don't specify a path to a project. |
Did a quick test changing here the _NET_WM_WINDOW_TYPE_UTILITY atom to _NET_WM_WINDOW_TYPE_DIALOG Now the menu boxes get the correct size but they are floating in wrong positions (Seems to a miscalculation based on my dual monitor setup). This change broke some tooltips, so maybe we should allow to choose between the two Atoms (utilities and dialogs) |
Thank you, it works |
We can probably pass |
I did some research using i3 a while ago, here's what i got from that.
The issue is that mapping the window makes it immediately known to the WM which, at least in the case of i3, can clear some of it properties and resizes the window if there isn't the right atom set. Now, why does it work randomly? Reading through the debug logs, i found this section, which gives me some hints:
It seems that right after mapping most of the times i3 managed Godot's popup instantly, not finding any atoms since they weren't set yet. I tried moving the mapping to a later stage in that function In my messy fork, effectively swapping step 2 and 3, and it fixed all tooltips and simple popups. More complex popups(Like the "Add Node" window) don't work, and that's where i left off. My hypotesis for this last part of the issue with those popups is that, maybe they inherit from Edit: typo |
Ok, so I tried making changes into the generic display server itself which for now I implemented only for the "linuxbsd" platform in my messy fork. Now a window has to be shown with the At this point almost everything works with the exception of a few popups (like one which goes "Play current scene" > "Would you like to save the current scene?" > "yes" > popup which closes almost instantly) and some warning in other ones("out of date"). There are also some position issues, are those related to this problem regarding tiling WMs or is it a more general one? Also, should i start making a pull request? |
I think it's a general one: #38591 |
Lately I've been busy, but I've made some tests and can confirm that the positional issues i got were related to that issue and got fixed by the pull request in its comments. |
When creating a window, Godot would first register it to the WM(show it) and then set its flags. This works fine on a floating WM, but on tiling WMs as soon as a window gets registered the WM immediately acts on the window by scaling it up and treating it as a generic window, being registered without any special flags. This commit separates the showing of the window into another function and calls it after the most important flags are set, making windows with special flags(eg. all popups) work again on tiling WMs. Fixes godotengine#37930
When creating a window, Godot would first register it to the WM(show it) and then set its flags. This works fine on a floating WM, but on tiling WMs as soon as a window gets registered the WM immediately acts on the window by scaling it up and treating it as a generic window, being registered without any special flags. This commit separates the showing of the window into another function and calls it after the most important flags are set, making windows with special flags(eg. all popups) work again on tiling WMs. Fixes godotengine#37930
Godot version: 4.0.dev
OS/device including version: Manjaro + i3
Issue description: The new editor behaves weird while using i3wm (and maybe other tilling wm's). I know version 4 is still in development, i just wanted to report that!
The image below is when clicking the "Editor"
The image below is when click the 3 vertical dots
Steps to reproduce: Use i3
Minimal reproduction project: I don't need to provide a project because its not a project specific
The text was updated successfully, but these errors were encountered: