bar: fix workspaces switching
Fix throwing errors when trying to switch to current ws
This commit is contained in:
parent
8e8ea841de
commit
7ee7dc59a6
1 changed files with 5 additions and 1 deletions
|
|
@ -70,7 +70,11 @@ Item {
|
||||||
MouseArea {
|
MouseArea {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
|
||||||
onPressed: event => Hyprland.dispatch(`workspace ${layout.childAt(event.x, event.y).index + root.groupOffset + 1}`)
|
onPressed: event => {
|
||||||
|
const ws = layout.childAt(event.x, event.y).index + root.groupOffset + 1;
|
||||||
|
if (Hyprland.activeWsId !== ws)
|
||||||
|
Hyprland.dispatch(`workspace ${ws}`);
|
||||||
|
}
|
||||||
onWheel: event => {
|
onWheel: event => {
|
||||||
const activeWs = Hyprland.activeClient?.workspace?.name;
|
const activeWs = Hyprland.activeClient?.workspace?.name;
|
||||||
if (activeWs?.startsWith("special:"))
|
if (activeWs?.startsWith("special:"))
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue