1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-06-08 04:09:15 -04:00

notification: fix modal escape key handling in connected mode

fixes #2566
This commit is contained in:
bbedward
2026-06-03 10:49:51 -04:00
parent 2f2d4c9d9b
commit e5fff91ae6
2 changed files with 12 additions and 14 deletions
@@ -262,6 +262,7 @@ Item {
clickCatcher.visible = true; clickCatcher.visible = true;
if (!contentWindow.visible) if (!contentWindow.visible)
contentWindow.visible = true; contentWindow.visible = true;
opened();
shouldHaveFocus = false; shouldHaveFocus = false;
Qt.callLater(() => shouldHaveFocus = Qt.binding(() => shouldBeVisible)); Qt.callLater(() => shouldHaveFocus = Qt.binding(() => shouldBeVisible));
}); });
@@ -535,13 +536,11 @@ Item {
implicitHeight: root.useSingleWindow ? 0 : root.alignedHeight + (shadowBuffer * 2) implicitHeight: root.useSingleWindow ? 0 : root.alignedHeight + (shadowBuffer * 2)
onVisibleChanged: { onVisibleChanged: {
if (visible) { if (visible)
opened(); return;
} else { if (Qt.inputMethod) {
if (Qt.inputMethod) { Qt.inputMethod.hide();
Qt.inputMethod.hide(); Qt.inputMethod.reset();
Qt.inputMethod.reset();
}
} }
} }
@@ -90,6 +90,7 @@ Item {
if (!useSingleWindow) if (!useSingleWindow)
clickCatcher.visible = true; clickCatcher.visible = true;
contentWindow.visible = true; contentWindow.visible = true;
opened();
shouldHaveFocus = false; shouldHaveFocus = false;
Qt.callLater(() => shouldHaveFocus = Qt.binding(() => shouldBeVisible)); Qt.callLater(() => shouldHaveFocus = Qt.binding(() => shouldBeVisible));
} }
@@ -286,13 +287,11 @@ Item {
implicitHeight: root.useSingleWindow ? 0 : root.alignedHeight + (shadowBuffer * 2) implicitHeight: root.useSingleWindow ? 0 : root.alignedHeight + (shadowBuffer * 2)
onVisibleChanged: { onVisibleChanged: {
if (visible) { if (visible)
opened(); return;
} else { if (Qt.inputMethod) {
if (Qt.inputMethod) { Qt.inputMethod.hide();
Qt.inputMethod.hide(); Qt.inputMethod.reset();
Qt.inputMethod.reset();
}
} }
} }