Skip to content

xdpw: added a screencast chooser#396

Draft
trigg wants to merge 1 commit intomasterfrom
stream-chooser
Draft

xdpw: added a screencast chooser#396
trigg wants to merge 1 commit intomasterfrom
stream-chooser

Conversation

@trigg
Copy link
Collaborator

@trigg trigg commented Mar 9, 2026

This PR adds a small GTK app to :

  • Present user with a list of outputs & toplevels
  • Allow user to select one
  • Return this data to xdpw

Streaming toplevels require two extra protocols:

  • ext-image-copy-capture-v1
  • ext-foreign-toplevel-list-v1

Testing being done with:

Packages & versions:

  • xdg-desktop-portal-wlr-git 0.8.1.r6.ga413366-1
  • sway-git 1.12.r7645.c57daaf-1

Quirks:

  • It is on the layer shell. This is not a hard requirement, but a choice I'm willing to be swayed on
    • The app will need to remove itself from the list of presented toplevels
    • A way to draw the users attention to it will likely be essential
  • stdout MUST NOT contain anything more than the prescribed reply. More likely we'll need to silence GTK warnings and errors or send them only to std:err. Cancel or failure to choose in any way MUST reply with empty stdout
  • The chooser MUST detect when required protocols are missing for toplevel selection and present the user with the outputs instead.
  • Currently, hotplug outputs is entirely theoretical. Patches welcome

Other additions to consider:

  • Some way of warning or preventing the user from making an invalid selection
  • Check required protocols for output screenshare too, and warn user if it is impossible
  • For people who like having lots of toplevels, we probably need to consider a scrollbox around the flowbox.
  • At some point we'll need to get thumbnails for outputs and toplevels on start & tab switch

TLDR:
2026_03_09_15_42_23
2026_03_09_15_42_21
2026_03_09_15_42_09
2026_03_09_16_08_34

@trigg
Copy link
Collaborator Author

trigg commented Mar 10, 2026

For anyone hoping to test this :
systemctl --user restart xdg-desktop-portal-wlr

the xdpw user service needs to be reloaded after installing (or reboot, if you're insane)

@AKArien
Copy link
Contributor

AKArien commented Mar 10, 2026

It is on the layer shell. This is not a hard requirement, but a choice I'm willing to be swayed on

A way to draw the users attention to it will likely be essential

If we’re already on it (which i’m not gonna try to sway you on, sounds good to me), just being there as an overlay should be enough, no ? isn’t that what most desktops just do ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants