mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-04-14 01:32:29 -04:00
add some null safety checks
This commit is contained in:
@@ -687,6 +687,7 @@ Item {
|
|||||||
enabled: isActive
|
enabled: isActive
|
||||||
cursorShape: Qt.PointingHandCursor
|
cursorShape: Qt.PointingHandCursor
|
||||||
onClicked: {
|
onClicked: {
|
||||||
|
if (!appIcon.windowId) return
|
||||||
if (CompositorService.isHyprland) {
|
if (CompositorService.isHyprland) {
|
||||||
Hyprland.dispatch(`focuswindow address:${appIcon.windowId}`)
|
Hyprland.dispatch(`focuswindow address:${appIcon.windowId}`)
|
||||||
} else if (CompositorService.isNiri) {
|
} else if (CompositorService.isNiri) {
|
||||||
@@ -755,6 +756,7 @@ Item {
|
|||||||
enabled: isActive
|
enabled: isActive
|
||||||
cursorShape: Qt.PointingHandCursor
|
cursorShape: Qt.PointingHandCursor
|
||||||
onClicked: {
|
onClicked: {
|
||||||
|
if (!appIcon.windowId) return
|
||||||
if (CompositorService.isHyprland) {
|
if (CompositorService.isHyprland) {
|
||||||
Hyprland.dispatch(`focuswindow address:${appIcon.windowId}`)
|
Hyprland.dispatch(`focuswindow address:${appIcon.windowId}`)
|
||||||
} else if (CompositorService.isNiri) {
|
} else if (CompositorService.isNiri) {
|
||||||
|
|||||||
@@ -352,7 +352,7 @@ Item {
|
|||||||
}
|
}
|
||||||
|
|
||||||
onClicked: (event) => {
|
onClicked: (event) => {
|
||||||
if (!windowData) return
|
if (!windowData || !windowData.address) return
|
||||||
|
|
||||||
if (event.button === Qt.LeftButton) {
|
if (event.button === Qt.LeftButton) {
|
||||||
root.overviewOpen = false
|
root.overviewOpen = false
|
||||||
|
|||||||
Reference in New Issue
Block a user