Skip to content

Comments

Fix/xwayland fullscreen panels#1944

Open
ZeusCraft10 wants to merge 4 commits intopop-os:masterfrom
ZeusCraft10:fix/xwayland-fullscreen-panels
Open

Fix/xwayland fullscreen panels#1944
ZeusCraft10 wants to merge 4 commits intopop-os:masterfrom
ZeusCraft10:fix/xwayland-fullscreen-panels

Conversation

@ZeusCraft10
Copy link

fix: Correctly hide panels for fullscreen Xwayland apps

This PR addresses issue #2840 where COSMIC panels (top and bottom bars) would remain visible when an Xwayland application (such as Proton games) entered fullscreen mode.

The issue was caused by the has_focused_fullscreen check in src/shell/focus/order.rs strictly checking for KeyboardFocusTarget::Fullscreen. However, Xwayland windows are often focused as KeyboardFocusTarget::Element even when they are in fullscreen state.

This fix updates the logic to check if the currently focused element corresponds to the active fullscreen surface, regardless of the wrapper variant (Element or Fullscreen).

Closes: pop-os/cosmic-epoch#2840

Verification

  • Confirmed that panels hide correctly when launching Proton games (e.g., via Steam) in fullscreen mode.
  • Verified that panels reappear upon exiting fullscreen or Alt-Tabbing.
  • cargo check passes.

Copy link
Member

@Drakulix Drakulix left a comment

Choose a reason for hiding this comment

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

Thanks, looks like an okay fix.

However please drop the other commits (including the merge) and rebase 55de076 against master.

KeyboardFocusTarget::Fullscreen(s) => Some(s) == fullscreen.map(|f| &f.surface),
KeyboardFocusTarget::Element(m) => fullscreen
.is_some_and(|f| m.windows().any(|(s, _)| s == &f.surface)),
_ => false,
Copy link
Member

Choose a reason for hiding this comment

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

This is weird. I'd assume those windows are override-redirect windows otherwise they really shouldn't be Elements but fullscreen.

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.

COSMIC panels do not hide in fullscreen Proton applications

2 participants