-
-
Notifications
You must be signed in to change notification settings - Fork 21.3k
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 editor window disappears on BSPWM tilling manager when changing the workspace #68471
Comments
I have a similar issue #65425 with the XMonad tiling window manager, but in my case Godot crashes and terminates. There's clearly a race condition when the Godot window is hidden/shown. And it doesn't just happen to the editor but also games. |
Tried other TWM's, here are the results: |
Can you reproduce this when starting the editor with the |
v4.0.beta5.official [89a33d2] |
For me it's seems to be happening only when sending Godot to a different workspace using |
The problem seems to be with the order of events sent by BSPWM. When changing workspaces, it sets WM_STATE_NORMAL and sends MapNotify before sending ConfigureNotify, causing wd.minimized to have an outdated value (true), while _window_minimize_check returns proper value (false) , since it checks for WM_STATE_ICONIC godot/platform/linuxbsd/x11/display_server_x11.cpp Lines 1993 to 1995 in 0a3f664
This causes execution of _set_wm_minimized, which tells BSPWM to hide window, by setting it's internal hidden flag to 1
Logs with DISPLAY_SERVER_X11_DEBUG_LOGS_ENABLED and my additions to monitor this two values show, that indeed is the case
This could be fixed by working around and calling _window_changed before mode validation here godot/platform/linuxbsd/x11/display_server_x11.cpp Lines 3771 to 3773 in 0a3f664
Or by calling show_desktop after stack in the focus_node in BSPWM source code if (m->desk != d) {
show_desktop(d);
set_input_focus(n);
has_input_focus = true;
hide_desktop(m->desk);
m->desk = d;
}
// ...
stack(d, n, true);
// <-- Somewhere here
|
Just adding _window_changed is not enough. Looking at _validate_mode_on_map it seems, that it only applies window properties to true. Why is that? godot/platform/linuxbsd/x11/display_server_x11.cpp Lines 1989 to 1995 in 0a3f664
Shouldn't there be a check like this? bool desiredFullscreen = _window_fullscreen_check(p_window);
bool desiredMaximized = _window_maximize_check(p_window, "_NET_WM_STATE");
bool desiredMinimized = _window_minimize_check(p_window);
if (wd.fullscreen != desiredFullscreen) {
_set_wm_fullscreen(p_window, desiredFullscreen, wd.exclusive_fullscreen);
} else if (wd.maximized != desiredMaximized) {
_set_wm_maximized(p_window, desiredMaximized);
} else if (wd.minimized != desiredMinimized) {
_set_wm_minimized(p_window, desiredMinimized);
} |
is there any workaround to this for now? its very tedious having to manually find and kill off the right godot process and reopen my project just to start working on it again every 5-10 mins |
#69995 seemed to have fixed it for me |
The default behaviour for X11 is to crash even on non-fatal errors when there is no error handler set. This change allows the window to stay open and may enable users to save their work when things go wrong. This acts as a workaround for godotengine#65425 and godotengine#68471
is this still gonna be worked on? the issue persists in the current godot version |
Confirmed - v4.0.3 on bspwm, switching the active workspace, still blackholes the Editor |
same with latest master branch compile (v4.1 beta), which includes a commit that conflicts with ryze312's branch |
latest master branch + accepting ryze312's commits for merging fixes the issue |
nvm |
The issue also happens on Pop Shell (an i3-like tiling window management in Pop OS) and can be reproduced reliably like this:
I found one workaround which let's me quickly solve the issue again:
Hopefully this helps in tackling this annoying issue. |
can confirm this works on latest AUR release of godot-mono-bin on bspwm, this some black magic shit |
Accidentally closed the issue, sorry. |
With Godot 4.1.1 and bspwm, a temp fix is unsetting the node's |
Thank you for the workaround, it's enough for me, but this issue should be fixed. |
I can't seem to reproduce the issue anymore, can anyone else check if they're still experiencing it? Maybe other TWM's are still plagued by the issue? |
Just tried it on a fresh git pull. I'm using the XMonad window manager and Godot used to randomly crash when switching workspaces. Not anymore. The error that caused the crash now seems to be caught and logged instead. Switching between workspaces will now sometimes show this in the editor's console:
That error is what I used to see in gdb/lldb when it crashed before. |
#75099 seems to be what fixed it for me. But that was merged already in 4.1 so if you still had the problem in 4.1.2 then that can't be relevant for you. |
i can now move godot windows to a different workspace, but if i am loading up godot or a project, and switch workspaces while thats happening, the window becomes hidden |
Can you please try it on stable 4.2? It is fixed for me, so if you don't have any issues either I'm closing this issue. |
I cannot trigger the behavior anymore in 4.2 by following my previously posted procedure. So it seems to be fixed. |
Well, it's fixed for me on Godot 4.2. |
Godot version
v4.0.beta4.official [e675154]
System information
ArchLinux, BSPWM
Issue description
When i open the Godot 4.0 editor using BSPWM tiling window manager sometimes when switching between workspaces Godot editor window disappears.
It seems to happen more often when there's another window open on the same workspace as the editor.
Reproducible on beta 1, 2 and 4, didn't test on beta 3.
Reproducible on old alpha Godot 4.0 build (alpha 5).
Can't reproduce it on other TWM's like sway.
Never had this problem on 3.x, works as expected on 3.5.1
https://user-images.githubusercontent.com/28687947/201021555-70ac4d4e-36a4-46f8-8e4e-50d6cef18d62.mp4
Steps to reproduce
Minimal reproduction project
Not needed, can be reproduced on startup or/and on a new empty project.
The text was updated successfully, but these errors were encountered: