fix(linux/xdgportal): Improve multi-monitor support and work around breaking kmsgrab#4969
fix(linux/xdgportal): Improve multi-monitor support and work around breaking kmsgrab#4969Kishi85 wants to merge 3 commits intoLizardByte:masterfrom
Conversation
|
@ReenigneArcher would be great to see this in ASAP as I've managed to accidentally remove the stream sorting in my final commit re-structure on #4931 and now the streams are random in the order coming from the portal. This might also help identifying the issues in #4968 |
|
Now also fixes kmsgrab by not dropping CAP_SYS_ADMIN earlier than before #4931. |
|
Can confirm this resolves the issue with kmsgrab failing to initialize when probed via default I was thinking that finalize_portal_security() may be better suited with a more generic name and moved to a platform function in misc.cpp just in case other/future capture methods also need dropped capabilities, but that's not important right now, or relevant to this PR. Looks good to me. |
28528d4 to
ada081d
Compare
This adds a few safety checks to stream selection for displays and re-adds the missing stream sorting that seems to have gotten lost during the commit restructuring in PR#4931
…portal display Introducing multi-monitor support required connecting to the portal early for display name enumeration. This will finalize_portal_security and drop CAP_SYS_ADMIN before KMS encoder probing, breaking it. To work around the issue finalize_portal_security on first display init and return a dummy display name until portal display encoder probing starts (dropping CAP_SYS_ADMIN as before PR#4931). Display re-enumeration is done on client connect so no functionality is lost.
Since the singleton is now just storing persistent runtime information for portalgrab, reflect this in the type name
ada081d to
d54564f
Compare
|
There are clang format issues in this PR. Don't worry, it's easy to fix.
|
|
Bundle ReportBundle size has no change ✅ |



Description
Follow up to #4931 that adds a few safety checks to selected pipewire streams and also re-adds the stream sorting by position that was lost during the final commit restructuring of said PR.
It also changes how finalizing portal security is done (dropping CAP_SYS_ADMIN + setting PR_DUMPABLE) to not break kmsgrab by dropping capabilties as before #4931.
Screenshot
Issues Fixed or Closed
Roadmap Issues
Type of Change
Checklist
AI Usage