Supreeeme / xwayland-satellite

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

Clipboard does not work from wayland to x11 #50

Closed matejc closed 2 months ago

matejc commented 2 months ago

Hey, I am using xwayland-satellite and clipboard behaves strange. If I copy text from Kitty (wayland), I can not paste into Steam (X11 app); And if I copy text in Steam I get this error in Niri: Sep 04 00:03:07 matej70 niri[2504151]: 2024-09-03T21:03:07.786153Z ERROR smithay::backend::renderer::gles: [GL] GL_INVALID_VALUE in glTexSubImage2D(xoffset 0 + width 24 > 16) - not sure if related, but otherwise I can paste to Kitty back.

There is no output from xwayland-satellite at the time of copy or paste. I get a bunch of warnings when starting Steam, I can share them later when I get back home.

How to debug this further?

Supreeeme commented 2 months ago

I'm not able to reproduce this. Are you using the latest git version of satellite?

matejc commented 2 months ago

I am using this revision (95afa163a60167cd97bf6afa870bc117a1be3d03): https://github.com/sodiboo/niri-flake/blob/99f51769fba8b86369ea44b48fc92eea8b43620d/flake.lock#L952 Which seems to be current main of xwayland-satellite

But yes, it might be some sort of my environment problem, just that I am unsure how to debug it.

PS: I am using Flatpak Steam

Supreeeme commented 2 months ago

I thought Flatpak might be a factor, but it seems not. Try launching satellite with RUST_LOG=debug set, and then try the copy/paste, and post the terminal output here.

YaLTeR commented 2 months ago

FWIW I had it happen once that clipboard to/from xwl-satellite broke (I was using Discord), but I don't know how to reproduce it, and it's been working mostly fine since.

matejc commented 2 months ago

Cant reproduce Kitty -> Steam anymore, at the time I had system-wide set SDL_VIDEODRIVER=x11, maybe that effected xwayland-satellite somehow.

I do have similar issue, this one happens consistently. When I open Vortex from Steam (through SteamTinkerLaunch), I can paste only first time, the subsequent times it pastes the text I copied at first time.

  1. Copy some text
  2. Focus Vortex
  3. Paste
  4. Focus something else

1st time:

 2024-09-08T18:02:22.609Z DEBUG xwayland_satellite::server::event     > entering surface (2517011)
 2024-09-08T18:02:22.609Z DEBUG xwayland_satellite::server::event     > configuring toplevel 1918x1052, [5, 0, 0, 0, 6, 0, 0, 0, 7, 0, 0, 0, 8, 0, 0, 0, 4, 0, 0, 0]
 2024-09-08T18:02:22.609Z DEBUG xwayland_satellite::server::event     > configuring Window { res_id: 56623112 }: 1920x0, 1918x1052
 2024-09-08T18:02:22.609Z DEBUG xwayland_satellite::server            > focusing window Window { res_id: 56623112 }
 2024-09-08T18:02:24.176Z DEBUG xwayland_satellite::xstate::selection > Got selection request for target UTF8_STRING
 2024-09-08T18:02:26.316Z DEBUG xwayland_satellite::server::event     > wl_surface@21[0] entered wl_output@14[0]
 2024-09-08T18:02:26.318Z DEBUG xwayland_satellite::server::event     > leaving surface (2517612)
 2024-09-08T18:02:26.318Z DEBUG xwayland_satellite::server::event     > configuring toplevel 1918x1052, [5, 0, 0, 0, 6, 0, 0, 0, 7, 0, 0, 0, 8, 0, 0, 0]
 2024-09-08T18:02:26.318Z DEBUG xwayland_satellite::server::event     > configuring Window { res_id: 56623112 }: 1920x0, 1918x1052

2nd time:

 2024-09-08T18:02:34.701Z DEBUG xwayland_satellite::server::event     > entering surface (2518778)
 2024-09-08T18:02:34.701Z DEBUG xwayland_satellite::server::event     > configuring toplevel 1918x1052, [5, 0, 0, 0, 6, 0, 0, 0, 7, 0, 0, 0, 8, 0, 0, 0, 4, 0, 0, 0]
 2024-09-08T18:02:34.701Z DEBUG xwayland_satellite::server::event     > configuring Window { res_id: 56623112 }: 1920x0, 1918x1052
 2024-09-08T18:02:34.701Z DEBUG xwayland_satellite::server            > focusing window Window { res_id: 56623112 }
 2024-09-08T18:02:39.200Z DEBUG xwayland_satellite::server::event     > wl_surface@21[0] entered wl_output@14[0]
 2024-09-08T18:02:39.201Z DEBUG xwayland_satellite::server::event     > leaving surface (2519257)
 2024-09-08T18:02:39.201Z DEBUG xwayland_satellite::server::event     > configuring toplevel 1918x1052, [5, 0, 0, 0, 6, 0, 0, 0, 7, 0, 0, 0, 8, 0, 0, 0]
 2024-09-08T18:02:39.201Z DEBUG xwayland_satellite::server::event     > configuring Window { res_id: 56623112 }: 1920x0, 1918x1052

Works the same with flatpak Steam or directly

Supreeeme commented 2 months ago

Ok, I was finally able to reproduce this. Looks like something weird with some GTK applications, it's not giving the selection data like other applications do for some reason.