mirror of
https://github.com/noctalia-dev/noctalia-shell.git
synced 2026-05-11 17:08:27 +08:00
IPCService: adjust lock/lockAndSuspend logic
This commit is contained in:
@@ -374,7 +374,7 @@ Singleton {
|
||||
function lock() {
|
||||
// Only lock if not already locked (prevents the red screen issue)
|
||||
if (!PanelService.lockScreen.active) {
|
||||
PanelService.lockScreen.active = true;
|
||||
CompositorService.lock();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -508,13 +508,18 @@ Singleton {
|
||||
});
|
||||
}
|
||||
|
||||
function lock() {
|
||||
CompositorService.lock();
|
||||
}
|
||||
function lock() {
|
||||
if (!PanelService.lockScreen.active) {
|
||||
CompositorService.lock();
|
||||
}
|
||||
}
|
||||
|
||||
function lockAndSuspend() {
|
||||
CompositorService.lockAndSuspend();
|
||||
}
|
||||
function lockAndSuspend() {
|
||||
// Only lock and suspend if not already locked
|
||||
if (!PanelService.lockScreen.active) {
|
||||
CompositorService.lockAndSuspend();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
IpcHandler {
|
||||
@@ -557,14 +562,6 @@ Singleton {
|
||||
}
|
||||
}
|
||||
|
||||
function get(screen: string): string {
|
||||
if (screen === "all" || screen === "") {
|
||||
return Quickshell.screens.map(screen => WallpaperService.currentWallpapers[screen.name]);
|
||||
} else {
|
||||
return [ WallpaperService.currentWallpapers[screen]];
|
||||
};
|
||||
}
|
||||
|
||||
function set(path: string, screen: string) {
|
||||
if (screen === "all" || screen === "") {
|
||||
screen = undefined;
|
||||
|
||||
Reference in New Issue
Block a user