Repository navigation
Conversation
|
Sorry to post here but don't know if there's a better place. I'm curious if this will in some form give a game running in gamescope with vkShade running access to/from the system clipboard? I currently run a hack in Faugus to allow copy/paste (pre-launch: I could see a lot of value add if vkShade were the solution to that? Maybe using vkShade as a bridge between clipboards in Gamescope and Linux. Since it's already running (even if effects are toggled off, vkShade would need to be running to check for toggles). Might be considered scope creep but if it's doable without massive extra effort I really see it being useful. Maybe a setting in the .ini to enable it and have it off by default. |
Most likely not, I think rather gamescope would need to bridge the clipboard between the system and its nested compositor. So maybe you should report an issue in the gamescope project? Also, vkShade has no business in creating such workarounds. If even possible, it would be very hacky, not just scope creep. Your hack already shows that it is a problem bridging different compositor technologies (Xorg and Wayland) for the clipboard, and it's probably just a missing implementation in gamescope. |
1c3e7d0 to
0796dc0
Compare
Wrap borrowed application Wayland displays with a vkShade-owned registry and event queue. Keep feature proxies on the isolated queue so input and future platform services can share the lifecycle without dispatching application events. Migrate the input backend to the shared context and release its seat, keyboard, and pointer proxies before tearing down the queue.
Provide an isolated XCB clipboard owner that serves UTF-8 text without consuming application events. Connect it to ImGui's platform clipboard callback and leave the private fallback in place when no X11 or Xwayland display is available.
Publish copied UTF-8 text through the compositor data-device protocol when vkShade runs on a native Wayland surface. Reuse the borrowed display and latest input serial while keeping clipboard protocol objects on their own event queue. Fall back to the isolated XCB provider when no native Wayland clipboard is available.
0796dc0 to
b2e24b3
Compare
|
Update: this branch now also includes a native Wayland @Jahfry This does not address your Gamescope use case. Games running through XWayland inside Gamescope use vkShade's XCB provider, and the resulting clipboard remains inside Gamescope's nested namespace. Bridging that namespace to the host clipboard remains Gamescope's responsibility. The native Wayland provider has passed build and unit verification but remains runtime-untested for now. |
Summary
wl_data_deviceon native WaylandMotivation
ImGui's default Linux fallback only stores clipboard contents inside the current process. Consequently, text copied from an ImGui field cannot reach another desktop client.
Clipboard ownership also requires the owner to keep serving protocol requests. The XCB provider therefore uses a private connection and bounded background event loop. The Wayland provider reuses the application's borrowed display and latest input serial, while keeping its registry, protocol objects, and event processing on a vkShade-owned queue. Neither provider consumes application events.
The abstraction also provides the infrastructure needed by explicit Copy controls for the live log and developer diagnostics.
Scope
The integration publishes text from vkShade to the clipboard of the compositor on which the application runs. On a nested compositor such as Gamescope, this is the nested clipboard namespace. Bridging it to the host clipboard remains the compositor's responsibility.
The current interface covers clipboard writes. Existing ImGui text fields can exercise it through
Ctrl+C, and later Copy controls can use the same backend.Verification
xclipclient:TARGETS,UTF8_STRING,TEXT, andSTRINGwere advertised