mirror of
https://github.com/Rafostar/clapper.git
synced 2025-08-30 07:42:23 +02:00
Do not show cursor on small movement
This commit is contained in:
@@ -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();
|
||||
|
||||
|
Reference in New Issue
Block a user