From b2e052d7a4f25a07a878af05a26eee6f48f7267c Mon Sep 17 00:00:00 2001 From: Rafostar <40623528+Rafostar@users.noreply.github.com> Date: Fri, 16 Oct 2020 22:11:54 +0200 Subject: [PATCH] Do not show cursor on small movement --- clapper_src/app.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/clapper_src/app.js b/clapper_src/app.js index a3649c88..5cfa681f 100644 --- a/clapper_src/app.js +++ b/clapper_src/app.js @@ -344,9 +344,18 @@ var App = GObject.registerClass({ if(this.posX === posX && this.posY === posY) return; + /* Do not show cursor on small movements */ + let ignoreMovement = ( + Math.abs(this.posX - posX) <= 0.5 + && Math.abs(this.posY - posY) <= 0.5 + ); + this.posX = posX; this.posY = posY; + if(ignoreMovement) + return; + this.player.widget.set_cursor(this.defaultCursor); this.setHideCursorTimeout();