1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-04-04 21:02:06 -04:00

hypr: add exclusive focus override

This commit is contained in:
bbedward
2025-12-05 10:37:24 -05:00
parent c69a55df29
commit b5378e5d3c
13 changed files with 29 additions and 17 deletions

View File

@@ -12,7 +12,7 @@ DankModal {
HyprlandFocusGrab {
windows: [root.contentWindow]
active: CompositorService.isHyprland && root.shouldHaveFocus
active: root.useHyprlandFocusGrab && root.shouldHaveFocus
}
property string deviceName: ""

View File

@@ -15,7 +15,7 @@ DankModal {
HyprlandFocusGrab {
windows: [clipboardHistoryModal.contentWindow]
active: CompositorService.isHyprland && clipboardHistoryModal.shouldHaveFocus
active: clipboardHistoryModal.useHyprlandFocusGrab && clipboardHistoryModal.shouldHaveFocus
}
property int totalCount: 0

View File

@@ -47,6 +47,7 @@ Item {
property bool useOverlayLayer: false
readonly property alias contentWindow: contentWindow
readonly property alias backgroundWindow: backgroundWindow
readonly property bool useHyprlandFocusGrab: CompositorService.useHyprlandFocusGrab
signal opened
signal dialogClosed
@@ -262,7 +263,7 @@ Item {
return customKeyboardFocus;
if (!shouldHaveFocus)
return WlrKeyboardFocus.None;
if (CompositorService.isHyprland)
if (root.useHyprlandFocusGrab)
return WlrKeyboardFocus.OnDemand;
return WlrKeyboardFocus.Exclusive;
}

View File

@@ -13,7 +13,7 @@ DankModal {
HyprlandFocusGrab {
windows: [root.contentWindow]
active: CompositorService.isHyprland && root.shouldHaveFocus
active: root.useHyprlandFocusGrab && root.shouldHaveFocus
}
property string pickerTitle: I18n.tr("Choose Color")

View File

@@ -21,7 +21,7 @@ DankModal {
HyprlandFocusGrab {
windows: [root.contentWindow]
active: CompositorService.isHyprland && root.shouldHaveFocus
active: root.useHyprlandFocusGrab && root.shouldHaveFocus
}
function scrollDown() {

View File

@@ -13,7 +13,7 @@ DankModal {
HyprlandFocusGrab {
windows: [notificationModal.contentWindow]
active: CompositorService.isHyprland && notificationModal.shouldHaveFocus
active: notificationModal.useHyprlandFocusGrab && notificationModal.shouldHaveFocus
}
property bool notificationModalOpen: false

View File

@@ -15,7 +15,7 @@ DankModal {
HyprlandFocusGrab {
windows: [root.contentWindow]
active: CompositorService.isHyprland && root.shouldHaveFocus
active: root.useHyprlandFocusGrab && root.shouldHaveFocus
}
property int selectedIndex: 0

View File

@@ -12,7 +12,7 @@ DankModal {
HyprlandFocusGrab {
windows: [spotlightModal.contentWindow]
active: CompositorService.isHyprland && spotlightModal.shouldHaveFocus
active: spotlightModal.useHyprlandFocusGrab && spotlightModal.shouldHaveFocus
}
property bool spotlightOpen: false