VeryCrazyDog / gnome-disable-gestures

GNOME extension to disable gestures
https://extensions.gnome.org/extension/4049/disable-gestures-2021/
MIT License
17 stars 12 forks source link
gesture gnome gnome-extension kiosk touchscreen

gnome-disable-gestures

A GNOME extension that disable all GNOME built-in gestures. Useful for kiosks and touchscreen apps.

The original implementation of Disable Gestures extension by mattbell87 doesn't work when single-finger drag down from top of the screen. katastrophal had provided an implementation at reddit and osoplex also provided another implementation at reddit too. Unfortunately none of these implementations were published to extensions.gnome.org.

This repo is created for the purpose to publish the extension using katastrophal's implementation.

Development resources

Appendix

Original implementation by mattbell87:

global.stage.get_actions().forEach(a => a.enabled = false);

katastrophal's implementation at reddit:

let disableUnfullscreenGesture = () => {
  global.stage.get_actions().forEach(a => { if (a != this) a.enabled = false;});
}
global.display.connect('notify::focus-window', disableUnfullscreenGesture);
global.display.connect('in-fullscreen-changed', disableUnfullscreenGesture);

osoplex's implementation at reddit:

global.stage.get_actions().forEach(a => global.stage.remove_action(a));