feat(linux/xdgportal): Simplify display matching logic#5053
Conversation
|
This should also serve as a potential workaround for #221 for xdgportal by setting output_name to the desired primary display connector name. @psyke83 Do you think we should also push the output_name from config to the top of the display_name list in that case (so it's always on CTRL+ALT+SHIFT+F1) or should we just let video.cpp select the display by configured name and leave the display name order (and therefore keyboard shortcuts) by position as it is currently? |
1266efd to
4d32cb1
Compare
|
I think that leaving the order by position seems logical but I really don't have a strong preference. |
This simplifies the display name matching logic and also allows for wl_output names to be used directly for config parameter output_name to select the initial display.
4d32cb1 to
306f146
Compare
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #5053 +/- ##
========================================
Coverage 18.15% 18.16%
========================================
Files 109 109
Lines 23582 23564 -18
Branches 10406 10396 -10
========================================
- Hits 4282 4280 -2
- Misses 16046 16856 +810
+ Partials 3254 2428 -826
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 51 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
|
I'll leave the current behaviour as it is then (sorting key order by position). This should be good to go then unless anyone finds an issue with it. |
Bundle ReportBundle size has no change ✅ |



Description
This simplifies the display name matching logic and also allows for wl_output names to be used directly for config parameter output_name to select the initial display. The latter I've noticed was possible due to a side-note in #5049.
Note: If someone already figured out that output_name can be used with portalgrab by prefixing the wayland output name with 'n' (DP-1 getting selected by output_name=nDP-1) this will break as it will now require the output_name to be equal to the wayland output name (DP-1 being selected with output_name=DP-1 in config) which is a lot more self-explaining.
Additionally the log message for found display explicitly states the id/name parameter now so it somewhat matches the documented behaviour.
Screenshot
Issues Fixed or Closed
Roadmap Issues
Type of Change
Checklist
AI Usage