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

Cursor sometimes disappears immediately after movement #1

Open
rootsh0pf opened this issue Feb 28, 2024 · 8 comments
Open

Cursor sometimes disappears immediately after movement #1

rootsh0pf opened this issue Feb 28, 2024 · 8 comments
Labels
help wanted Extra attention is needed

Comments

@rootsh0pf
Copy link

The extension works really well so far, thank you! :)
But it seems, the 5 seconds are not always counted correctly:
Sometimes the cursor disappears immediately after the movement and sometimes after just one second.

@elcste elcste added the help wanted Extra attention is needed label Feb 28, 2024
@elcste
Copy link
Owner

elcste commented Feb 28, 2024

You're welcome. It was really the one thing I was missing when switching to Wayland.

I thought I've noticed that too but I didn't look systematically, so thanks for the confirmation.

I think there's a flaw relating to linking the code that sets the 5 second timer with the code that hides the cursor. As I have very minimal javascript skills, I haven't thought of a better idea however. I am very open to collaboration or suggestions however :-)

@iago-lito
Copy link
Contributor

iago-lito commented Sep 10, 2024

The problem is that the status is checked after every 5 seconds. If it checks at 10 and you stop moving your cursor at 14, then only 1 second will be elapsed when it checks again at 15 again and the cursor disappears.

I have made an attempt to fix this in #3 by introducing 2 callbacks instead: one checks every second for the status and the other resets the clock on every cursor move. Let's test how it goes then.

@elcste
Copy link
Owner

elcste commented Sep 10, 2024

@iago-lito Thanks for working on this. What you describe better articulates what I thought was happening but lack the knowledge to fix.

I tried your version but it will not enable for me with the error

ReferenceError: tracker is not defined

(For the record I tested on Ubuntu Oracular with GNOME 47 beta 1).

iago-lito added a commit to iago-lito/hide-cursor that referenced this issue Sep 10, 2024
@iago-lito
Copy link
Contributor

iago-lito commented Sep 10, 2024

Yupe, sorry @elcste there are a few dummy mistakes in there yet because I'm not exactly confident how to try the extension without restarting my whole session so I haven't tested it at all. I'll tell you when I'm happy with it :)

[EDIT] Should be working now (at least it does on my side ;)

iago-lito added a commit to iago-lito/hide-cursor that referenced this issue Sep 10, 2024
@elcste
Copy link
Owner

elcste commented Sep 13, 2024

Thanks to @iago-lito's contribution, seems to be solved with 6dfe743!

@elcste elcste closed this as completed Sep 13, 2024
@elcste
Copy link
Owner

elcste commented Sep 13, 2024

Created a release here and submitted to EGO for review.

@elcste
Copy link
Owner

elcste commented Sep 13, 2024

It is live on EGO.

I realize I never tested myself on GNOME 45, only 46 and (the pre-release of) 47. I've made the new version active for 45 but I will reactivate the old version or something if someone reports an issue.

@elcste
Copy link
Owner

elcste commented Sep 16, 2024

I noticed a regression (see discussion in PR #3 (comment)). I've left the commit and release here – at least for now – but I've set the previous version to be active on EGO.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants