Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mouse cursor jumps around rapidly when moved #6

Open
MQDuck opened this issue Jul 29, 2020 · 13 comments
Open

Mouse cursor jumps around rapidly when moved #6

MQDuck opened this issue Jul 29, 2020 · 13 comments

Comments

@MQDuck
Copy link

MQDuck commented Jul 29, 2020

Whenever the mouse cursor is moved, it jumps around rapidly almost as if it's trying to exist in the superposition of two or sometimes three different cursor locations, each of which scale differently with mouse movement. It's difficult to describe, so I made a video: https://youtu.be/wr_hh1mULHk

@keyvez
Copy link

keyvez commented Jul 29, 2020

For me, it's happening when drawing in Photoshop. Great app btw. Loving it!!!!!

@aaron-trout
Copy link

This happens for me as well on a MacBook Pro running the latest MacOS 11 public beta (11.0 Beta (20A4300b)).

@AyrA
Copy link

AyrA commented Jul 29, 2020

Same issue on a Windows 10 host. Seems like some kind of factor is occasionally applied to the axis depending on how big X and Y are.

@OptimisticMonkey
Copy link

same issue

@doomchild
Copy link

Same problem. It seems like moving very slowly makes it happen slightly less.

@win9x-se
Copy link

Same problem here as well

@johnblommers
Copy link

Running version 1.04 on Ubuntu 20.04 and MATE. I'm seeing two cursors. They converge at the top left hand side of the window and they diverge more and more as the cursor moves further down and to the right.

@The-MAZZTer
Copy link

@johnblommers That is what I am seeing on Windows 10 so this sounds like a cross-platform issue.

When moving the cursor it rapidly moves between three points. The location that matches the real mouse location, and then two spots 2x and 3x the distance from the top left corner. When you stop moving the mouse the cursor may settle into any of these locations.

@The-MAZZTer
Copy link

The-MAZZTer commented Jul 29, 2020

I have a fix. In %LOCALAPPDATA%\macintosh\app-1.0.2\resources\app\src\renderer\input.js line 46-47 change

    mouseMoveX += inputEvent.dx;
    mouseMoveY += inputEvent.dy;

to

    mouseMoveX = inputEvent.dx;
    mouseMoveY = inputEvent.dy;

It looks like the problem is the JS was taking mousemove events and using the absolute mouse position as a delta (hence the names dx and dy). The developer may have been confused by the mousemove event data variable names "offsetX/Y" which refers to the location of the mouse cursor in a DOM element (eg location offset to the element location) NOT offset from previous mouse location.

@johnblommers
Copy link

Excellent. On Linux the offending file is at:

/usr/lib/macintosh.js/resources/app/src/renderer/input.js

The same edit as cited above fixes the problem. At lines 46-47:

    mouseMoveX = inputEvent.dx;
    mouseMoveY = inputEvent.dy;

@linguanostra
Copy link

Working great, on macOS the offending file is at:

/Applications/macintosh.js.app/Contents/Resources/app/src/renderer/input.js

@jonathanpotts
Copy link
Contributor

Submitted change via PR #30

@maxpereira
Copy link

@The-MAZZTer your fix worked for me experiencing the same issue on Windows 10 (2004).

felixrieseberg added a commit that referenced this issue Jul 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests