mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-26 14:23:09 +00:00
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)
21 lines
500 B
QML
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
|
|
}
|
|
}
|
|
|