mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2025-12-07 22:15:38 -05:00
niri: close spotlight when closing overview
This commit is contained in:
@@ -22,8 +22,10 @@ DankModal {
|
||||
|
||||
property bool spotlightOpen: false
|
||||
property alias spotlightContent: spotlightContentInstance
|
||||
property bool openedFromOverview: false
|
||||
|
||||
function show() {
|
||||
openedFromOverview = false
|
||||
spotlightOpen = true
|
||||
open()
|
||||
|
||||
@@ -55,6 +57,7 @@ DankModal {
|
||||
}
|
||||
|
||||
function hide() {
|
||||
openedFromOverview = false
|
||||
spotlightOpen = false
|
||||
close()
|
||||
}
|
||||
|
||||
@@ -11,6 +11,15 @@ Scope {
|
||||
// Only show overlay when in overview and spotlight is not open
|
||||
property bool overlayActive: NiriService.inOverview && !(PopoutService.spotlightModal?.spotlightOpen ?? false)
|
||||
|
||||
Connections {
|
||||
target: NiriService
|
||||
function onInOverviewChanged() {
|
||||
if (!NiriService.inOverview && PopoutService.spotlightModal?.openedFromOverview) {
|
||||
PopoutService.spotlightModal.hide()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loader {
|
||||
id: niriOverlayLoader
|
||||
active: NiriService.inOverview
|
||||
@@ -93,6 +102,7 @@ Scope {
|
||||
Qt.callLater(() => {
|
||||
if (PopoutService.spotlightModal) {
|
||||
if (event.text) {
|
||||
PopoutService.spotlightModal.openedFromOverview = true
|
||||
PopoutService.spotlightModal.showWithQuery(event.text.trim())
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user