Skip to content

Commit

Permalink
gesturesManager.js: Ignore gestures when the screensaver is active.
Browse files Browse the repository at this point in the history
Fixes #11800
  • Loading branch information
mtwebster committed Jul 30, 2023
1 parent 36ba660 commit 58655f2
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion js/ui/gestures/gesturesManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
const { Gio, GObject, Cinnamon } = imports.gi;
const Util = imports.misc.util;
const SignalManager = imports.misc.signalManager;
const ScreenSaver = imports.misc.screenSaver;

const actions = imports.ui.gestures.actions;
const { GestureType, GestureDirection, DeviceType } = imports.ui.gestures.ToucheggTypes;
Expand Down Expand Up @@ -103,7 +104,7 @@ var GesturesManager = class {
this.signalManager = new SignalManager.SignalManager(null);
this.settings = new Gio.Settings({ schema_id: SCHEMA })
this.signalManager.connect(this.settings, "changed", this.settings_or_devices_changed, this);

this.screenSaverProxy = new ScreenSaver.ScreenSaverProxy();
this.have_device = false;
this.client = null;
this.current_gesture = null;
Expand Down Expand Up @@ -209,6 +210,11 @@ var GesturesManager = class {
this.current_gesture = null;
}

if (this.screenSaverProxy.screenSaverActive) {
debug_gesture(`Ignoring 'gesture-begin', screensaver is active`);
return;
}

const definition_match = this.lookup_definition(type, direction, fingers);

if (definition_match == null) {
Expand Down

0 comments on commit 58655f2

Please sign in to comment.