shift-shell/components/mobileshell/qml/homescreen/DeviceLock.qml
Devin Lin d4f1c78d61 doubletaptolock: Simplify, and use "lock" instead of "sleep"
This MR does several things as a followup to
https://invent.kde.org/plasma/plasma-mobile/-/merge_requests/748:
- Use the word "lock" instead of "sleep" since we are locking the
  device, not putting it to sleep
- Simplify usage by using existing MouseAreas instead of including our
  own for this feature (I encountered several focus captures in folio that prevented the
SwipeArea from getting events)
2025-06-27 00:14:26 -04:00

21 lines
500 B
QML

// SPDX-FileCopyrightText: 2025 Florian RICHER <florian.richer@protonmail.com>
// SPDX-License-Identifier: LGPL-2.0-or-later
import QtQuick
import org.kde.plasma.private.mobileshell.dpmsplugin as DPMS
import org.kde.plasma.private.mobileshell.state as MobileShellState
QtObject {
id: root
function triggerLock() {
MobileShellState.LockscreenDBusClient.lockScreen();
__dpms.turnDpmsOff();
}
property DPMS.DPMSUtil __dpms: DPMS.DPMSUtil {
id: dpms
}
}