Skip to content

fix(linux): respect an explicit Ozone display backend - #1081

Merged
EtienneLescot merged 2 commits into
getopenscreen:mainfrom
mcmah309:fix/respect-ozone-platform
Oct 10, 2026
Merged

EtienneLescot merged 2 commits into
getopenscreen:mainfrom
mcmah309:fix/respect-ozone-platform

Conversation

@mcmah309

@mcmah309 mcmah309 commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Respect an explicit --ozone-platform choice instead of overriding it in Wayland sessions. Wayland remains the default when no backend is specified.

  • electron/wayland.ts: the startup Wayland setup moves out of main.ts; --ozone-platform=wayland is only appended when the switch is absent. The PipeWire capturer and the Vulkan opt-out stay on in every Wayland session, so capture under an explicit Xwayland backend still goes through the portal.
  • electron/ipc/desktopSourceTypes.ts reuses the same isWaylandSession check instead of a copy.

Type of change

  • Bug fix
  • Feature
  • Enhancement
  • Documentation
  • Refactor / maintenance
  • Performance
  • Security

Release impact

  • Patch
  • Minor
  • Major / breaking change
  • No release note needed

Desktop impact

  • Windows
  • macOS
  • Linux
  • Installer / packaging
  • Not platform-specific

Screenshots / video

Testing

  • electron/wayland.test.ts: default Wayland session, explicit x11 / wayland / auto, non-Wayland session.
  • Author: X11 editor smoke test.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes
    • Improved Linux Wayland compatibility by configuring the required display and screen-sharing support when running in a Wayland session.
    • Existing display-platform settings are preserved, and non-Wayland sessions remain unchanged.

@coderabbitai

coderabbitai Bot commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 6d1c13c5-5f3c-4253-8e24-caa240fcc4be


📥 Commits

Reviewing files that changed from the base of the PR and between 870196c and 5f18ab1.



📒 Files selected for processing (4)
  • electron/ipc/desktopSourceTypes.ts
  • electron/main.ts
  • electron/wayland.test.ts
  • electron/wayland.ts


Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 4 remain after this review.




📝 Walkthrough
📝 Walkthrough

Walkthrough

The change adds shared Wayland session detection and command-line configuration. Linux startup uses the configuration helper, and desktop source enumeration uses the shared detector.

Changes

Linux Wayland support

Layer / File(s) Summary
Wayland detection and configuration
electron/wayland.ts, electron/wayland.test.ts
The helper detects Wayland from XDG_SESSION_TYPE or WAYLAND_DISPLAY. In Wayland sessions, it preserves an existing Ozone platform setting, enables drag and PipeWire features, and disables Vulkan. Tests cover Wayland and non-Wayland environments.
Linux startup and source enumeration
electron/main.ts, electron/ipc/desktopSourceTypes.ts
Linux startup calls the configuration helper. Desktop source enumeration uses the shared detector and returns true only for Linux sessions that are not Wayland.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Suggested reviewers: etiennelescot



Merge Risk: ⚪ Minimal · up to 5f18a

No actionable issue is identified that would prevent merging after normal checks.

Pre-merge checks | Passed 4 | Failed 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 4 functions across 4 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Description check Passed The description covers the change, type, release impact, platform impact, and testing. The related issue field remains as the template placeholder "Fixes #", but the description is otherwise complete.
Title check Passed The title clearly and concisely identifies the main Linux change: preserving an explicit Ozone display backend.

  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR



  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

desktopSourceTypes pointed at main.ts for a test that now lives in wayland.ts. Restore the Vulkan rationale the move shortened, and pin that the PipeWire capturer stays on under an explicit Xwayland backend.
@EtienneLescot

Copy link
Copy Markdown
Collaborator

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@EtienneLescot
EtienneLescot marked this pull request as ready for review October 10, 2026 09:03
@EtienneLescot
EtienneLescot self-requested a review as a code owner October 10, 2026 09:03
@EtienneLescot

Copy link
Copy Markdown
Collaborator

Marked ready: CI green; added a follow-up commit sharing the Wayland session check with source enumeration.

@EtienneLescot EtienneLescot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed: an explicit --ozone-platform is respected, Wayland stays the default. Thanks @mcmah309!

@EtienneLescot
EtienneLescot merged commit 3116651 into getopenscreen:main Oct 10, 2026
22 checks passed
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