From 58fedcfc70da26c1ca90e92dca1b305dbe75f3b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Sch=C3=A4r?= Date: Sat, 11 May 2024 23:25:34 +0200 Subject: [PATCH] Stop partial contest lock bypass --- .../extensions/contest-lock@soi.ch/extension.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/os/layers/contestant/includes.chroot/usr/share/gnome-shell/extensions/contest-lock@soi.ch/extension.js b/os/layers/contestant/includes.chroot/usr/share/gnome-shell/extensions/contest-lock@soi.ch/extension.js index d73ab3a..92c3d37 100644 --- a/os/layers/contestant/includes.chroot/usr/share/gnome-shell/extensions/contest-lock@soi.ch/extension.js +++ b/os/layers/contestant/includes.chroot/usr/share/gnome-shell/extensions/contest-lock@soi.ch/extension.js @@ -10,6 +10,7 @@ const { const Background = imports.ui.background; const Layout = imports.ui.layout; const Main = imports.ui.main; +const ScreenShield = imports.ui.screenShield; // half of the time for which a frame is displayed const HALF_FRAME_TIME_MS = 8; @@ -254,6 +255,14 @@ function activate () { return; } + // Monkeypatch disable regular lock screen deactivation. + // It is possible to trigger this function while contest lock is active, + // by pressing Ctrl+Alt+F1. This switches to GDM, which, after the automatic + // login timeout, switches back to our session and emits an Unlock signal. + // If we did not disable it here, this would then partially unlock the screen, + // such that you can interact with the Gnome Shell but not with applications. + ScreenShield.ScreenShield.prototype.deactivate = () => {}; + actor.show(); Main.sessionMode.pushMode('unlock-dialog');