Restore topbar drawer input plumbing

Keep Folio responsible for the visible convergence chrome, but let
the panel containment keep its transparent ActionDrawerOpenSurface
for the topbar hit target. This restores the old click and drag
behavior while keeping the legacy statusbar visual hidden in
convergence.

Add a passive hover-only MouseArea to show the pointing-hand cursor
without stealing input from the drawer swipe surface.
This commit is contained in:
Marco Allegretti 2026-05-25 09:00:34 +02:00
parent d3ab18d200
commit 3004c34f61
5 changed files with 45 additions and 20 deletions

View file

@ -56,6 +56,13 @@ MobileShell.SwipeArea {
anchors.fill: parent anchors.fill: parent
MouseArea {
anchors.fill: parent
acceptedButtons: Qt.NoButton
hoverEnabled: true
cursorShape: ShellSettings.Settings.convergenceModeEnabled ? Qt.PointingHandCursor : Qt.ArrowCursor
}
onSwipeStarted: (point) => startSwipeWithPoint(point) onSwipeStarted: (point) => startSwipeWithPoint(point)
onSwipeEnded: endSwipe() onSwipeEnded: endSwipe()
onSwipeMove: (totalDeltaX, totalDeltaY, deltaX, deltaY) => updateOffset(deltaY); onSwipeMove: (totalDeltaX, totalDeltaY, deltaX, deltaY) => updateOffset(deltaY);

View file

@ -299,9 +299,10 @@ ContainmentItem {
readonly property real topBarHeight: MobileShell.Constants.topPanelHeight readonly property real topBarHeight: MobileShell.Constants.topPanelHeight
readonly property real dockHeight: MobileShell.Constants.convergenceDockHeight readonly property real dockHeight: MobileShell.Constants.convergenceDockHeight
readonly property real frameThickness: MobileShell.Constants.convergenceWorkspaceFrameThickness readonly property real frameThickness: MobileShell.Constants.convergenceWorkspaceFrameThickness
readonly property real topBarHitHeight: topBarHeight + frameThickness
readonly property real frameRadius: Math.min(MobileShell.Constants.convergenceWorkspaceFrameRadius, Math.max(0, Math.min(workAreaWidth, workAreaHeight) / 2)) readonly property real frameRadius: Math.min(MobileShell.Constants.convergenceWorkspaceFrameRadius, Math.max(0, Math.min(workAreaWidth, workAreaHeight) / 2))
readonly property real workAreaX: frameThickness readonly property real workAreaX: frameThickness
readonly property real workAreaY: topBarHeight + frameThickness readonly property real workAreaY: topBarHitHeight
readonly property real workAreaWidth: Math.max(0, width - frameThickness * 2) readonly property real workAreaWidth: Math.max(0, width - frameThickness * 2)
readonly property real workAreaHeight: Math.max(0, height - topBarHeight - dockHeight - frameThickness * 2) readonly property real workAreaHeight: Math.max(0, height - topBarHeight - dockHeight - frameThickness * 2)
readonly property color chromeColor: Kirigami.Theme.backgroundColor readonly property color chromeColor: Kirigami.Theme.backgroundColor
@ -322,7 +323,7 @@ ContainmentItem {
Kirigami.Theme.colorSet: Kirigami.Theme.Window Kirigami.Theme.colorSet: Kirigami.Theme.Window
function updateInputRegion() { function updateInputRegion() {
const topBarRegion = Qt.rect(0, 0, width, topBarHeight) const topBarRegion = Qt.rect(0, 0, width, topBarHitHeight)
if (shouldHide && dockOffset >= dockHeight) { if (shouldHide && dockOffset >= dockHeight) {
MobileShell.ShellUtil.setInputRegions(convergenceChrome, [ MobileShell.ShellUtil.setInputRegions(convergenceChrome, [
topBarRegion, topBarRegion,
@ -405,11 +406,6 @@ ContainmentItem {
showTime: true showTime: true
backgroundColor: "transparent" backgroundColor: "transparent"
} }
TapHandler {
acceptedButtons: Qt.LeftButton
onTapped: MobileShellState.ShellDBusClient.openActionDrawer()
}
} }
Shape { Shape {

View file

@ -64,7 +64,9 @@ Item {
screen: Plasmoid.screen screen: Plasmoid.screen
maximizedTracker: containmentItem.windowMaximizedTracker maximizedTracker: containmentItem.windowMaximizedTracker
visible: !MobileShellState.LockscreenDBusClient.lockscreenActive && !containmentItem.fullscreen visible: !MobileShellState.LockscreenDBusClient.lockscreenActive
&& !containmentItem.fullscreen
&& !ShellSettings.Settings.convergenceModeEnabled
} }
// Status bar component // Status bar component
@ -74,6 +76,8 @@ Item {
StatusBarWrapper { StatusBarWrapper {
id: statusBarWrapper id: statusBarWrapper
z: 1 z: 1
visible: !ShellSettings.Settings.convergenceModeEnabled
enabled: visible
anchors.fill: parent anchors.fill: parent
statusPanelHeight: MobileShell.Constants.topPanelHeight statusPanelHeight: MobileShell.Constants.topPanelHeight

View file

@ -76,10 +76,13 @@ ContainmentItem {
} }
readonly property real topBarHeight: gamingMode ? 0 : MobileShell.Constants.topPanelHeight readonly property real topBarHeight: gamingMode ? 0 : MobileShell.Constants.topPanelHeight
readonly property real panelHeight: (ShellSettings.Settings.convergenceModeEnabled || gamingMode) ? 0 : MobileShell.Constants.topPanelHeight
readonly property real convergenceWorkspaceFrameThickness: ShellSettings.Settings.convergenceModeEnabled && !gamingMode readonly property real convergenceWorkspaceFrameThickness: ShellSettings.Settings.convergenceModeEnabled && !gamingMode
? MobileShell.Constants.convergenceWorkspaceFrameThickness ? MobileShell.Constants.convergenceWorkspaceFrameThickness
: 0 : 0
readonly property real topBarInputHeight: topBarHeight + convergenceWorkspaceFrameThickness
readonly property real panelHeight: gamingMode
? 0
: (ShellSettings.Settings.convergenceModeEnabled ? topBarInputHeight : MobileShell.Constants.topPanelHeight)
onPanelHeightChanged: setWindowProperties() onPanelHeightChanged: setWindowProperties()
function setWindowProperties() { function setWindowProperties() {
@ -103,7 +106,9 @@ ContainmentItem {
function updateTouchArea() { function updateTouchArea() {
const hiddenTouchAreaThickness = Kirigami.Units.gridUnit; const hiddenTouchAreaThickness = Kirigami.Units.gridUnit;
if (MobileShellState.ShellDBusClient.panelState == "hidden") { if (ShellSettings.Settings.convergenceModeEnabled) {
MobileShell.ShellUtil.setInputRegion(root.panel, Qt.rect(0, 0, root.panel.width, root.panel.height));
} else if (MobileShellState.ShellDBusClient.panelState == "hidden") {
MobileShell.ShellUtil.setInputRegion(root.panel, Qt.rect(0, 0, root.panel.width, hiddenTouchAreaThickness)); MobileShell.ShellUtil.setInputRegion(root.panel, Qt.rect(0, 0, root.panel.width, hiddenTouchAreaThickness));
} else { } else {
MobileShell.ShellUtil.setInputRegion(root.panel, Qt.rect(0, 0, 0, 0)); MobileShell.ShellUtil.setInputRegion(root.panel, Qt.rect(0, 0, 0, 0));
@ -155,20 +160,20 @@ ContainmentItem {
visible: ShellSettings.Settings.convergenceModeEnabled && !ShellSettings.Settings.gamingModeEnabled visible: ShellSettings.Settings.convergenceModeEnabled && !ShellSettings.Settings.gamingModeEnabled
color: "transparent" color: "transparent"
flags: Qt.FramelessWindowHint | Qt.WindowTransparentForInput flags: Qt.FramelessWindowHint | Qt.WindowTransparentForInput
height: Math.max(1, root.topBarHeight + root.convergenceWorkspaceFrameThickness) height: Math.max(1, root.topBarInputHeight)
width: 1 width: 1
LayerShell.Window.scope: "topbar-space" LayerShell.Window.scope: "topbar-space"
LayerShell.Window.layer: LayerShell.Window.LayerBottom LayerShell.Window.layer: LayerShell.Window.LayerBottom
LayerShell.Window.anchors: LayerShell.Window.AnchorTop | LayerShell.Window.AnchorLeft | LayerShell.Window.AnchorRight LayerShell.Window.anchors: LayerShell.Window.AnchorTop | LayerShell.Window.AnchorLeft | LayerShell.Window.AnchorRight
LayerShell.Window.exclusionZone: Math.max(1, root.topBarHeight + root.convergenceWorkspaceFrameThickness) LayerShell.Window.exclusionZone: Math.max(1, root.topBarInputHeight)
LayerShell.Window.keyboardInteractivity: LayerShell.Window.KeyboardInteractivityNone LayerShell.Window.keyboardInteractivity: LayerShell.Window.KeyboardInteractivityNone
} }
// Visual panel component // Visual panel component
StatusPanel { StatusPanel {
id: statusPanel id: statusPanel
visible: !ShellSettings.Settings.gamingModeEnabled && !ShellSettings.Settings.convergenceModeEnabled visible: !ShellSettings.Settings.gamingModeEnabled
anchors.fill: parent anchors.fill: parent
containmentItem: root containmentItem: root
} }

View file

@ -8,6 +8,7 @@ repo_root="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
constants="$repo_root/components/mobileshell/qml/components/Constants.qml" constants="$repo_root/components/mobileshell/qml/components/Constants.qml"
panel="$repo_root/containments/panel/qml/main.qml" panel="$repo_root/containments/panel/qml/main.qml"
status_panel="$repo_root/containments/panel/qml/StatusPanel.qml"
status_bar_template="$repo_root/layout-templates/org.kde.plasma.mobile.defaultStatusBar/contents/layout.js" status_bar_template="$repo_root/layout-templates/org.kde.plasma.mobile.defaultStatusBar/contents/layout.js"
taskpanel="$repo_root/containments/taskpanel/qml/main.qml" taskpanel="$repo_root/containments/taskpanel/qml/main.qml"
folio_main="$repo_root/containments/homescreens/folio/qml/main.qml" folio_main="$repo_root/containments/homescreens/folio/qml/main.qml"
@ -17,6 +18,7 @@ folio_home="$repo_root/containments/homescreens/folio/qml/FolioHomeScreen.qml"
folio_backend="$repo_root/containments/homescreens/folio/homescreen.h" folio_backend="$repo_root/containments/homescreens/folio/homescreen.h"
folio_backend_cpp="$repo_root/containments/homescreens/folio/homescreen.cpp" folio_backend_cpp="$repo_root/containments/homescreens/folio/homescreen.cpp"
action_content="$repo_root/components/mobileshell/qml/actiondrawer/private/ContentContainer.qml" action_content="$repo_root/components/mobileshell/qml/actiondrawer/private/ContentContainer.qml"
action_open_surface="$repo_root/components/mobileshell/qml/actiondrawer/ActionDrawerOpenSurface.qml"
action_landscape="$repo_root/components/mobileshell/qml/actiondrawer/private/LandscapeContentContainer.qml" action_landscape="$repo_root/components/mobileshell/qml/actiondrawer/private/LandscapeContentContainer.qml"
quick_settings="$repo_root/components/mobileshell/qml/actiondrawer/private/QuickSettings.qml" quick_settings="$repo_root/components/mobileshell/qml/actiondrawer/private/QuickSettings.qml"
quick_settings_panel="$repo_root/components/mobileshell/qml/actiondrawer/private/QuickSettingsPanel.qml" quick_settings_panel="$repo_root/components/mobileshell/qml/actiondrawer/private/QuickSettingsPanel.qml"
@ -48,10 +50,21 @@ require_line "$panel" "root.panel.location = PlasmaCore.Types.TopEdge"
require_line "$panel" "root.panel.offset = 0" require_line "$panel" "root.panel.offset = 0"
require_line "$panel" "root.panel.visibilityMode = (!ShellSettings.Settings.convergenceModeEnabled && ShellSettings.Settings.autoHidePanelsEnabled) ? 3 : 0" require_line "$panel" "root.panel.visibilityMode = (!ShellSettings.Settings.convergenceModeEnabled && ShellSettings.Settings.autoHidePanelsEnabled) ? 3 : 0"
require_line "$panel" "readonly property real topBarHeight: gamingMode ? 0 : MobileShell.Constants.topPanelHeight" require_line "$panel" "readonly property real topBarHeight: gamingMode ? 0 : MobileShell.Constants.topPanelHeight"
require_line "$panel" "readonly property real panelHeight: (ShellSettings.Settings.convergenceModeEnabled || gamingMode) ? 0 : MobileShell.Constants.topPanelHeight" require_line "$panel" "readonly property real topBarInputHeight: topBarHeight + convergenceWorkspaceFrameThickness"
require_line "$panel" "height: Math.max(1, root.topBarHeight + root.convergenceWorkspaceFrameThickness)" require_line "$panel" "? 0"
require_line "$panel" "LayerShell.Window.exclusionZone: Math.max(1, root.topBarHeight + root.convergenceWorkspaceFrameThickness)" require_line "$panel" ": (ShellSettings.Settings.convergenceModeEnabled ? topBarInputHeight : MobileShell.Constants.topPanelHeight)"
require_line "$panel" "visible: !ShellSettings.Settings.gamingModeEnabled && !ShellSettings.Settings.convergenceModeEnabled" require_line "$panel" "MobileShell.ShellUtil.setInputRegion(root.panel, Qt.rect(0, 0, root.panel.width, root.panel.height));"
require_line "$panel" "height: Math.max(1, root.topBarInputHeight)"
require_line "$panel" "LayerShell.Window.exclusionZone: Math.max(1, root.topBarInputHeight)"
require_line "$panel" "visible: !ShellSettings.Settings.gamingModeEnabled"
require_line "$status_panel" "&& !ShellSettings.Settings.convergenceModeEnabled"
require_line "$status_panel" "visible: !ShellSettings.Settings.convergenceModeEnabled"
require_line "$status_panel" "MobileShell.ActionDrawerOpenSurface {"
require_line "$action_open_surface" "MouseArea {"
require_line "$action_open_surface" "acceptedButtons: Qt.NoButton"
require_line "$action_open_surface" "hoverEnabled: true"
require_line "$action_open_surface" "cursorShape: ShellSettings.Settings.convergenceModeEnabled ? Qt.PointingHandCursor : Qt.ArrowCursor"
require_line "$status_bar_template" "panel.location = \"top\";" require_line "$status_bar_template" "panel.location = \"top\";"
@ -66,9 +79,9 @@ require_line "$folio_main" "id: convergenceChrome"
require_line "$folio_main" "LayerShell.Window.scope: \"convergence-chrome\"" require_line "$folio_main" "LayerShell.Window.scope: \"convergence-chrome\""
require_line "$folio_main" "height: Screen.height" require_line "$folio_main" "height: Screen.height"
require_line "$folio_main" "MobileShell.StatusBar {" require_line "$folio_main" "MobileShell.StatusBar {"
require_line "$folio_main" "onTapped: MobileShellState.ShellDBusClient.openActionDrawer()"
require_line "$folio_main" "MobileShell.ShellUtil.setInputRegions(convergenceChrome, [" require_line "$folio_main" "MobileShell.ShellUtil.setInputRegions(convergenceChrome, ["
require_line "$folio_main" "const topBarRegion = Qt.rect(0, 0, width, topBarHeight)" require_line "$folio_main" "readonly property real topBarHitHeight: topBarHeight + frameThickness"
require_line "$folio_main" "const topBarRegion = Qt.rect(0, 0, width, topBarHitHeight)"
require_line "$folio_main" "readonly property real dockHeight: MobileShell.Constants.convergenceDockHeight" require_line "$folio_main" "readonly property real dockHeight: MobileShell.Constants.convergenceDockHeight"
require_line "$folio_main" "readonly property real revealStripHeight: MobileShell.Constants.convergenceDockRevealHeight" require_line "$folio_main" "readonly property real revealStripHeight: MobileShell.Constants.convergenceDockRevealHeight"
require_line "$folio_main" "import QtQuick.Shapes 1.8" require_line "$folio_main" "import QtQuick.Shapes 1.8"
@ -76,7 +89,7 @@ require_line "$folio_main" "id: workspaceFrame"
require_line "$folio_main" "readonly property real frameThickness: MobileShell.Constants.convergenceWorkspaceFrameThickness" require_line "$folio_main" "readonly property real frameThickness: MobileShell.Constants.convergenceWorkspaceFrameThickness"
require_line "$folio_main" "readonly property real frameRadius:" require_line "$folio_main" "readonly property real frameRadius:"
require_line "$folio_main" "readonly property real workAreaX: frameThickness" require_line "$folio_main" "readonly property real workAreaX: frameThickness"
require_line "$folio_main" "readonly property real workAreaY: topBarHeight + frameThickness" require_line "$folio_main" "readonly property real workAreaY: topBarHitHeight"
require_line "$folio_main" "readonly property real workAreaWidth: Math.max(0, width - frameThickness * 2)" require_line "$folio_main" "readonly property real workAreaWidth: Math.max(0, width - frameThickness * 2)"
require_line "$folio_main" "readonly property real workAreaHeight: Math.max(0, height - topBarHeight - dockHeight - frameThickness * 2)" require_line "$folio_main" "readonly property real workAreaHeight: Math.max(0, height - topBarHeight - dockHeight - frameThickness * 2)"
require_line "$folio_main" "fillRule: ShapePath.OddEvenFill" require_line "$folio_main" "fillRule: ShapePath.OddEvenFill"