src/plugins/desktopchangeosd/package/contents/ui/main.qml
raw| 1 | /* |
| 2 | KWin - the KDE window manager |
| 3 | This file is part of the KDE project. |
| 4 | |
| 5 | SPDX-FileCopyrightText: 2012 Martin Gräßlin <[email protected]> |
| 6 | |
| 7 | SPDX-License-Identifier: GPL-2.0-or-later |
| 8 | */ |
| 9 | import QtQuick |
| 10 | import org.kde.kwin |
| 11 | |
| 12 | Loader { |
| 13 | id: mainItemLoader |
| 14 | |
| 15 | Connections { |
| 16 | target: Workspace |
| 17 | function onCurrentDesktopChanged(previous) { |
| 18 | if (!mainItemLoader.item) { |
| 19 | mainItemLoader.source = "osd.qml"; |
| 20 | } |
| 21 | mainItemLoader.item.show(previous); |
| 22 | } |
| 23 | } |
| 24 | } |