very broken keybinds lol
This commit is contained in:
34
Bar.qml
34
Bar.qml
@@ -1,8 +1,9 @@
|
||||
import QtQuick
|
||||
import QtQuick.Effects
|
||||
import QtQuick.Layouts
|
||||
import Quickshell
|
||||
import Quickshell.Hyprland
|
||||
import Quickshell.Io
|
||||
import Quickshell.Wayland
|
||||
import "./Services/"
|
||||
import "Bar"
|
||||
import "Color.js" as Colors
|
||||
|
||||
@@ -19,6 +20,15 @@ Scope {
|
||||
required property var modelData
|
||||
property HyprlandMonitor monitor: Hyprland.monitorFor(modelData)
|
||||
|
||||
function refocus() {
|
||||
if (WlrLayershell == null)
|
||||
return;
|
||||
WlrLayershell.keyboardFocus = WlrKeyboardFocus.None;
|
||||
Qt.callLater(() => {
|
||||
WlrLayershell.keyboardFocus = WlrKeyboardFocus.Exclusive;
|
||||
});
|
||||
}
|
||||
|
||||
color: "transparent"
|
||||
exclusionMode: ExclusionMode.Normal
|
||||
exclusiveZone: barExclusionZone
|
||||
@@ -39,6 +49,26 @@ Scope {
|
||||
}
|
||||
}
|
||||
|
||||
Component.onCompleted: {
|
||||
if (this.WlrLayershell != null) {
|
||||
this.WlrLayershell.keyboardFocus = WlrKeyboardFocus.OnDemand;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Connections {
|
||||
function onRaiseCancelled() {
|
||||
win.WlrLayershell.keyboardFocus = WlrKeyboardFocus.OnDemand;
|
||||
}
|
||||
|
||||
function onRaiseRequested() {
|
||||
// win.WlrLayershell.keyboardFocus = WlrKeyboardFocus.Exclusive;
|
||||
win.refocus();
|
||||
}
|
||||
|
||||
target: FocusManager
|
||||
}
|
||||
|
||||
anchors {
|
||||
left: true
|
||||
right: true
|
||||
|
||||
Reference in New Issue
Block a user