mirror of
https://github.com/Rafostar/clapper.git
synced 2025-08-31 00:11:59 +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)
|
if(this.posX === posX && this.posY === posY)
|
||||||
return;
|
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.posX = posX;
|
||||||
this.posY = posY;
|
this.posY = posY;
|
||||||
|
|
||||||
|
if(ignoreMovement)
|
||||||
|
return;
|
||||||
|
|
||||||
this.player.widget.set_cursor(this.defaultCursor);
|
this.player.widget.set_cursor(this.defaultCursor);
|
||||||
this.setHideCursorTimeout();
|
this.setHideCursorTimeout();
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user