Skip to content
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

Unfocusing Detroit: Become Human to another Xwayland window makes it go black until restarted #54

Open
YaLTeR opened this issue Sep 15, 2024 · 5 comments
Labels
bug Something isn't working

Comments

@YaLTeR
Copy link

YaLTeR commented Sep 15, 2024

Unfocusing to a Wayland window and back is fine, here's the log:

 2024-09-15T08:49:50.759Z DEBUG xwayland_satellite::server::event     > leaving surface (1860688)
 2024-09-15T08:49:50.759Z DEBUG xwayland_satellite::server::event     > configuring toplevel 2560x1440, [2, 0, 0, 0]
 2024-09-15T08:49:50.759Z DEBUG xwayland_satellite::server::event     > configuring Window { res_id: 58720257 }: 0x0, 2560x1440
(focusing it back)
 2024-09-15T08:49:57.020Z DEBUG xwayland_satellite::server::event     > entering surface (1860699)
 2024-09-15T08:49:57.020Z DEBUG xwayland_satellite::server::event     > configuring toplevel 2560x1440, [2, 0, 0, 0, 4, 0, 0, 0]
 2024-09-15T08:49:57.020Z DEBUG xwayland_satellite::server::event     > configuring Window { res_id: 58720257 }: 0x0, 2560x1440
 2024-09-15T08:49:57.020Z DEBUG xwayland_satellite::server            > focusing window Window { res_id: 58720257 }

Unfocusing to another Xwayland window immediately causes it to go black (the cursor is still visible), and nothing seems to restore it until restart. Its custom cursor, the sound, and input still works though. Here's the log:

 2024-09-15T08:50:08.610Z DEBUG xwayland_satellite::server::event     > configuring toplevel 1010x1424, [4, 0, 0, 0]
 2024-09-15T08:50:08.610Z DEBUG xwayland_satellite::server::event     > configuring Window { res_id: 31457336 }: 0x0, 1010x1424
 2024-09-15T08:50:08.610Z DEBUG xwayland_satellite::server::event     > configuring toplevel 2560x1440, [2, 0, 0, 0]
 2024-09-15T08:50:08.610Z DEBUG xwayland_satellite::server::event     > configuring Window { res_id: 58720257 }: 0x0, 2560x1440
 2024-09-15T08:50:08.611Z DEBUG xwayland_satellite::server            > focusing window Window { res_id: 31457336 }
 2024-09-15T08:50:08.612Z DEBUG xwayland_satellite::server            > unmapping Window { res_id: 44040193 }
 2024-09-15T08:50:08.614Z DEBUG xwayland_satellite::xstate            > changed property "_WINE_HWND_STYLE" for Window { res_id: 58720257 }
 2024-09-15T08:50:08.615Z DEBUG xwayland_satellite::xstate            > changed property "_WINE_HWND_EXSTYLE" for Window { res_id: 58720257 }
 2024-09-15T08:50:08.615Z DEBUG xwayland_satellite::xstate            > changed property "_MOTIF_WM_HINTS" for Window { res_id: 58720257 }
 2024-09-15T08:50:08.615Z DEBUG xwayland_satellite::xstate            > changed property "_NET_WM_WINDOW_TYPE" for Window { res_id: 58720257 }
 2024-09-15T08:50:08.618Z DEBUG xwayland_satellite::xstate            > changed property "_NET_WM_ICON" for Window { res_id: 58720257 }
 2024-09-15T08:50:08.618Z WARN  xwayland_satellite::xstate            > unrecognized message: Atom { res_id: 530 }
 2024-09-15T08:50:08.618Z DEBUG xwayland_satellite::xstate            > changed property "_NET_WM_BYPASS_COMPOSITOR" for Window { res_id: 58720257 }
 2024-09-15T08:50:08.618Z DEBUG xwayland_satellite::server::event     > configuring toplevel 2560x1440, [2, 0, 0, 0]
 2024-09-15T08:50:08.618Z DEBUG xwayland_satellite::server::event     > configuring Window { res_id: 58720257 }: 0x0, 2560x1440
(focusing it back)
 2024-09-15T08:50:11.533Z DEBUG xwayland_satellite::server::event     > configuring toplevel 1010x1424, []
 2024-09-15T08:50:11.533Z DEBUG xwayland_satellite::server::event     > configuring Window { res_id: 31457336 }: 0x0, 1010x1424
 2024-09-15T08:50:11.533Z DEBUG xwayland_satellite::server::event     > configuring toplevel 2560x1440, [2, 0, 0, 0, 4, 0, 0, 0]
 2024-09-15T08:50:11.533Z DEBUG xwayland_satellite::server::event     > configuring Window { res_id: 58720257 }: 0x0, 2560x1440
 2024-09-15T08:50:11.533Z DEBUG xwayland_satellite::server            > focusing window Window { res_id: 58720257 }
 2024-09-15T08:50:13.478Z DEBUG xwayland_satellite::server::event     > leaving surface (1860723)
 2024-09-15T08:50:13.478Z DEBUG xwayland_satellite::server::event     > configuring toplevel 2560x1440, [2, 0, 0, 0]
 2024-09-15T08:50:13.478Z DEBUG xwayland_satellite::server::event     > configuring Window { res_id: 58720257 }: 0x0, 2560x1440

Maybe it tries to minimize itself on unfocus and xwl-satellite needs to unminimize it or something?

@Supreeeme
Copy link
Owner

I've seen this in another game and it could be a Proton bug (or I was just too lazy to fix it). I need to check the behavior on kwin. In the meantime a workaround is to use gamescope.

@Dimev
Copy link

Dimev commented Sep 28, 2024

Happens with beamng as well by the looks of it, tho there it seems to just not do anything afterward, no sounds either

@alicealysia
Copy link

Happens in noita as well. I've been finding that the only way to "tab out" so to speak, is to use gamescope.

@tyressk
Copy link

tyressk commented Nov 6, 2024

Happens with Rocket League as well

@UjinT34
Copy link

UjinT34 commented Jan 27, 2025

This should only happen to apps thinking that they are in exclusive fullscreen mode. Wine/proton uses some x11 properties to mark "minimizing from exclusive fullscreen" when an app loses focus and use them to trigger "restore exlusive fullscreen" when focused again. Resending XCB_ICCCM_WM_STATE_NORMAL seems to be enough. But might also need some other properties that usually doesn't make sense in a wayland environment. Check hyprwm/Hyprland#6966 and related issues.

@Supreeeme Supreeeme added the bug Something isn't working label Feb 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants