diff --git a/data/de.wolfvollprecht.UberWriter.gschema.xml b/data/de.wolfvollprecht.UberWriter.gschema.xml index 48e86e3..e256002 100644 --- a/data/de.wolfvollprecht.UberWriter.gschema.xml +++ b/data/de.wolfvollprecht.UberWriter.gschema.xml @@ -21,6 +21,13 @@ It can cause performance problems to some users + + true + Allow Uberwriter to poll cursor motion + + Used for hidding the headerbar after 3 seconds if the cursor is not moving. + + "/tmp" Open file base path diff --git a/uberwriter/UberwriterWindow.py b/uberwriter/UberwriterWindow.py index f687147..e7c24a5 100644 --- a/uberwriter/UberwriterWindow.py +++ b/uberwriter/UberwriterWindow.py @@ -104,8 +104,10 @@ class UberwriterWindow(Gtk.ApplicationWindow): self.status_bar_visible = True self.was_motion = True self.buffer_modified_for_status_bar = False - self.connect("motion-notify-event", self.on_motion_notify) - GObject.timeout_add(3000, self.poll_for_motion) + + if self.settings.get_value("poll-motion"): + self.connect("motion-notify-event", self.on_motion_notify) + GObject.timeout_add(3000, self.poll_for_motion) self.accel_group = Gtk.AccelGroup() self.add_accel_group(self.accel_group)