Supreeeme / xwayland-satellite

Xwayland outside your Wayland
Mozilla Public License 2.0
210 stars 10 forks source link

Keyboard input gets stuck on a single window if two xwayland apps are open on niri #35

Closed dragonnn closed 4 months ago

dragonnn commented 4 months ago

If I open some wine app it works fine and receivers keyboard input fine. When it is open I do open for example spotify and that makes keyboard input not work on the wine app even when it is focused back. They keyboard input is stuck on spotify unless I close it. Some logs from xwayland-satellite:

xwayland-satellite                                                                                                                                      ─╯
 2024-07-01T07:21:37.469Z INFO  xwayland_satellite > Connected to Xwayland on :0
 2024-07-01T07:21:37.475Z INFO  xwayland_process   > The XKEYBOARD keymap compiler (xkbcomp) reports:
 2024-07-01T07:21:37.475Z INFO  xwayland_process   > > Warning:          Unsupported maximum keycode 708, clipping.
 2024-07-01T07:21:37.475Z INFO  xwayland_process   > >                   X11 cannot support keycodes above 255.
 2024-07-01T07:21:37.475Z INFO  xwayland_process   > > Warning:          Could not resolve keysym XF86KbdInputAssistPrevgrou
 2024-07-01T07:21:37.475Z INFO  xwayland_process   > > Warning:          Could not resolve keysym XF86KbdInputAssistNextgrou
 2024-07-01T07:21:37.476Z INFO  xwayland_process   > Errors from xkbcomp are not fatal to the X server
 2024-07-01T07:21:50.570Z WARN  xwayland_satellite::server::event > unhandled xdgtoplevel event: ConfigureBounds { width: 2528, height: 1003 }
 2024-07-01T07:21:50.570Z WARN  xwayland_satellite::server::event > unhandled xdgtoplevel event: WmCapabilities { capabilities: [3, 0, 0, 0] }
 2024-07-01T07:21:50.687Z WARN  xwayland_satellite::server::event > unhandled xdgtoplevel event: ConfigureBounds { width: 2528, height: 1003 }
 2024-07-01T07:21:50.687Z WARN  xwayland_satellite::server::event > unhandled xdgtoplevel event: WmCapabilities { capabilities: [3, 0, 0, 0] }
 2024-07-01T07:22:02.607Z WARN  xwayland_satellite::xstate        > unrecognized message: Atom { res_id: 253 }
 2024-07-01T07:22:02.608Z WARN  xwayland_satellite::server::event > unhandled xdgtoplevel event: ConfigureBounds { width: 1888, height: 1003 }
 2024-07-01T07:22:02.608Z WARN  xwayland_satellite::server::event > unhandled xdgtoplevel event: WmCapabilities { capabilities: [3, 0, 0, 0] }
 2024-07-01T07:23:08.188Z WARN  xwayland_satellite::xstate::selection > unexpected format: 0 (atom: SAVE_TARGETS, type: "None", property: Atom { res_id: 455 }) - copies as this type will fail!

But I don't see anything useful in it. Is that a know issue? Didn't find anything about it here

nyawox commented 4 months ago

I experience this issue only with certain electron programs. When I open obsidian or vesktop alongside any other xwayland apps, they stop accepting keyboard input. Meanwhile, wine games, telegram, vivaldi, and even spotify continue working fine. This is strange, and I wonder why we are having such vastly different experiences. I have done some investigation and found that the order in which I launch the apps and the order in which I focus on them can change their behavior, sometimes even temporarily resolving the issue. Initially, I thought appending flags or opening from terminal might be what magically fixed the issue, but I was mistaken. it's the order in which you open/focus things that matters.

EDIT: forgot to mention i'm running electron programs in xwayland, because of some issues I have with native wayland version

dragonnn commented 4 months ago

Spotify is an electron app to, so strange that you don't have issues with it. Wine I didn't test with games but I use a lot heidisql in it. When I first open heidisql and then open spotify heidisql stops receiving any keyboard input. And as far I remeber if I try to type something in heidisql having focus on it whatever I type is still recived by spotify even that it is out of focus.

EDIT

BTW. I noticed sometimes Thunderbird got stuck on reviving the last input action, when I opened a mail into a new tab and did try to close it it would immediately open it again. This I fixed with enabling MOZ_ENABLE_WAYLAND but I am wondering if that could be connected to the issue of keyboard input getting stuck too.

Supreeeme commented 4 months ago

This seems to largely be wine programs not receiving keyboard input properly when other windows are open.

M3t0r commented 4 months ago

I have Discord, Spotify, and Obsidian open, and I can type in all three :shrug:

xwayland-satellite v0.4-1, xorg-xwayland v24.1.0-1, niri v0.1.7-1, arch linux

nyawox commented 4 months ago

I forgot to mention that all the programs I referred to, including electron ones, are running in xwayland due to some issues (mostly IME not working because of the lack of text-input-v1 support, and weird scaling) with the native wayland versions. This issue occurs even without running wine programs. My current workaround is to open a terminal alongside obsidian/vesktop, and focus there before start typing.