Commit graph

3 commits

Author SHA1 Message Date
70fa861b30 Harden gaming mode and fix startup crash
Strut windows committed zero height to layer-shell during
early init, causing a protocol error and session exit. Wrap
height and exclusionZone in Math.max(1, ...) for top bar
and dock.

Persisted gamingModeEnabled=true with hardcoded
gameCenterOpen=false hid panels with no overlay visible.
Initialize gameCenterOpen from the stored setting.

Fix HUD visibility regression from an emergency visible:true
override. Various null-guard and positioning fixes from
static analysis across the gaming shell QML.
2026-04-20 09:46:32 +02:00
50ea5976ce Fix HUD crash, clarify exit dialog, hide hint tile
LayerShell windows with non-spanning anchors (AnchorTop|AnchorRight)
crash the compositor when made invisible because Qt briefly resizes
the surface to 0 before unmapping it. Wrap GamingHUD in a Loader so
the window is destroyed rather than hidden.

Replace the generic 'Yes / Cancel' exit dialog with 'Keep Playing /
Leave' in both the Game Center header and the QS tile, matching the
mental model of a couch user.

The 'Launch Hint' QS tile is now hidden (available: false) when
gaming mode is off so it does not clutter the regular action drawer.
2026-04-19 14:10:51 +02:00
d901815c9d Add gaming mode setting and quick settings tiles
Add a gamingModeEnabled bool and a gamingDismissHintEnabled bool to
the shell settings plugin, persisted in plasmamobilerc [General],
following the same pattern as convergenceModeEnabled.

Two new quick settings tiles:
- org.kde.plasma.quicksetting.gaming: toggles gaming mode on/off,
  shows explicit on/off label matching the convergence tile style.
- org.kde.plasma.quicksetting.gaminghint: shown while gaming mode
  is active; dismisses the Game Center hint.

Both tiles are added to the default group in quicksettings config.
2026-04-19 13:51:00 +02:00