Skip to content

fix(gpui): allow tray stop fallback when global shortcuts session fails - #2511

Merged
richiemcilroy merged 2 commits into
CapSoftware:mainfrom
melcheikh:fix/wayland-portal-fallback-safe
Oct 18, 2026
Merged

richiemcilroy merged 2 commits into
CapSoftware:mainfrom
melcheikh:fix/wayland-portal-fallback-safe

Conversation

@melcheikh

@melcheikh melcheikh commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Fixes #2500

When running on Wayland environments where global shortcut portal session creation fails (such as GNOME 50 / Fedora 44 requiring an App ID), run_portal_stop previously set *fallback_safe = false; before attempting to create the session with portal.create_session().

Because the session failed to create, run_wayland_stop checked if !fallback_safe and aborted recording with:

The recording shortcut registration could not be cleaned up safely

instead of proceeding to run_tray_stop as intended.

Solution

  • Defer setting *fallback_safe = false; until immediately after portal.create_session() succeeds.
  • If create_session() fails, fallback_safe remains true because no session was ever registered with the portal, allowing clean fallback to the system tray stop control.

Note

This is my first contribution to Cap! I hope this fix is welcome and helps Linux users on newer Wayland environments, and I would greatly appreciate consideration for any bounty or tip attached to this issue.

RetriggerConfidence Score: 5/5

The PR appears safe to merge; it enables tray fallback on session creation errors without weakening shortcut cleanup checks.

Summary

Moves fallback_safe = false until after portal.create_session() succeeds.

  • Wayland recording can use the tray when portal session creation fails.

Reviews (1) · Last reviewed commit: "fix(gpui): allow tray stop fallback when..." · Reviewed by Greptile

@vercel

vercel Bot commented Oct 13, 2026

Copy link
Copy Markdown
Contributor

@melcheikh is attempting to deploy a commit to the Cap Software Inc Team on Vercel.

A member of the Team first needs to authorize it.

@richiemcilroy
richiemcilroy merged commit ffb7b44 into CapSoftware:main Oct 18, 2026
47 of 50 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.

[Fedora 44 / GNOME 50] Screen recording fails on Wayland – GlobalShortcuts portal requires App ID

2 participants