Skip to content

klipper: guard against null in ClipboardMenu

Reason for the change

The ClipboardMenu's focus state depends on the window's visibility, but this fails when the window doesn't exist yet (such as on plasmashell start).

This change introduces a guard against this, removing an unnecessary warning in plasmashell output.

Test plan

Start plasmashell from terminal, observe warning like:
qrc:/qt/qml/org/kde/plasma/private/clipboard/ClipboardMenu.qml:157: TypeError: Cannot read property 'visible' of null

Apply change, restart plasmashell, no more warning.

Screenshots or screen recordings

N/A

Bugs fixed

N/A

Merge request reports