Skip to content

Commit 58655f2

Browse files
committed
gesturesManager.js: Ignore gestures when the screensaver is active.
Fixes #11800
1 parent 36ba660 commit 58655f2

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

js/ui/gestures/gesturesManager.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
const { Gio, GObject, Cinnamon } = imports.gi;
44
const Util = imports.misc.util;
55
const SignalManager = imports.misc.signalManager;
6+
const ScreenSaver = imports.misc.screenSaver;
67

78
const actions = imports.ui.gestures.actions;
89
const { GestureType, GestureDirection, DeviceType } = imports.ui.gestures.ToucheggTypes;
@@ -103,7 +104,7 @@ var GesturesManager = class {
103104
this.signalManager = new SignalManager.SignalManager(null);
104105
this.settings = new Gio.Settings({ schema_id: SCHEMA })
105106
this.signalManager.connect(this.settings, "changed", this.settings_or_devices_changed, this);
106-
107+
this.screenSaverProxy = new ScreenSaver.ScreenSaverProxy();
107108
this.have_device = false;
108109
this.client = null;
109110
this.current_gesture = null;
@@ -209,6 +210,11 @@ var GesturesManager = class {
209210
this.current_gesture = null;
210211
}
211212

213+
if (this.screenSaverProxy.screenSaverActive) {
214+
debug_gesture(`Ignoring 'gesture-begin', screensaver is active`);
215+
return;
216+
}
217+
212218
const definition_match = this.lookup_definition(type, direction, fingers);
213219

214220
if (definition_match == null) {

0 commit comments

Comments
 (0)