Supreeeme / xwayland-satellite

Xwayland outside your Wayland
Mozilla Public License 2.0
194 stars 9 forks source link

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

Open YaLTeR opened 1 month ago

YaLTeR commented 1 month ago

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 commented 1 month ago

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 commented 1 month ago

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

alicealysia commented 2 weeks ago

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

tyressk commented 2 days ago

Happens with Rocket League as well