diff --git a/panels/dock/tray/ShellSurfaceItemProxy.qml b/panels/dock/tray/ShellSurfaceItemProxy.qml index a4d406d4f..9b8fcd31b 100644 --- a/panels/dock/tray/ShellSurfaceItemProxy.qml +++ b/panels/dock/tray/ShellSurfaceItemProxy.qml @@ -20,6 +20,10 @@ Item { implicitWidth: shellSurface ? shellSurface.width : 10 implicitHeight: shellSurface ? shellSurface.height : 10 + function takeFocus() { + impl.takeFocus() + } + ShellSurfaceItem { id: impl width: parent.width diff --git a/panels/dock/tray/quickpanel/QuickPanelPage.qml b/panels/dock/tray/quickpanel/QuickPanelPage.qml index 4eb6cb422..a33220f00 100644 --- a/panels/dock/tray/quickpanel/QuickPanelPage.qml +++ b/panels/dock/tray/quickpanel/QuickPanelPage.qml @@ -64,6 +64,9 @@ Item { StackView.onActivating: function () { panelView.contentHeight = Qt.binding(function() { return contentHeight}) } + StackView.onActivated: function () { + takeFocus() + } } } } diff --git a/panels/dock/tray/quickpanel/SubPluginPage.qml b/panels/dock/tray/quickpanel/SubPluginPage.qml index a9273411d..c665aedf0 100644 --- a/panels/dock/tray/quickpanel/SubPluginPage.qml +++ b/panels/dock/tray/quickpanel/SubPluginPage.qml @@ -22,6 +22,10 @@ Item { property int subPluginMinHeight property int headerMargin: 10 + function takeFocus() { + surfaceLayer.takeFocus() + } + Component.onCompleted: { var surfaceMinHeight = subPluginMinHeight - titleLayer.height - headerMargin shellSurface.setEmbedPanelMinHeight(surfaceMinHeight)