elcste / hide-cursor

GNOME Shell extension to hide the cursor on inactivity
GNU General Public License v2.0
12 stars 4 forks source link

Attempt to solve #1: clarify timer callback(s). #3

Closed iago-lito closed 2 months ago

iago-lito commented 2 months ago

Here is an attempt to solve #1. I haven't been able to test it yet, so maybe don't merge before I have ^ ^"

iago-lito commented 2 months ago

I have finally tested it and it seems to work fine on my side @elcste :) What about yours?

elcste commented 2 months ago

It is working for me and seems to do what you say, which is a great improvement!

I did come across the issue I just filed as #4, but I see now that that issue is present for me with the current version, at least one the one computer I've tried so far, so that wouldn't be a regression with this PR.

I want to test a little more, such as on GNOME 46 on my main home computer, but I am hoping to merge this and will get it submitted to the GNOME Extensions site. Do you want a credit in the description or to be added to the copyright line at the top of the extension.js file?

iago-lito commented 2 months ago

Ok to all :) Keep testing until you're confident merging or ping me here. And I'm happy with any kind of credit. Thank you for the hide-cursor initiative in the first place <3

elcste commented 2 months ago

So far so good. I plan to merge when I get a moment. Would you like me to credit you username iago-lito or another name?

iago-lito commented 2 months ago

My commit author field yields Iago-lito <iago-lito@etak>, which I guess doesn't make much sense but I'll be happy with it ;)

elcste commented 2 months ago

@iago-lito Now that I merged and released I found a regression :-P

Previously, using the inhibit-unfocus API, the cursor was hidden but focus stayed where it was pointing. This makes using things that expect hover much easier. You can see it by pointing to something that shows a tooltip, like a button. After the 5 seconds, when the cursor is hidden, the tooltip now disappears too.

I see that code is there, but it is not doing what it previously did.

iago-lito commented 1 month ago

Wops, sorry for the regression. I'll try to look into it. Thank you for explaining, I did not notice this feature. Feel free to revert in the meantime or to open another issue.

elcste commented 1 month ago

I'm leaving the commit and release here – at least for now – but I've set the previous version to be active on EGO.

elcste commented 1 month ago

Tangentially, the more I used it with the full 5 seconds, I realized now I was used to the shorter timeout that often occurs with my initial version. I think I chose 5 seconds from the unclutter default (at least from Debian packaging). Something to think about.

iago-lito commented 1 month ago

He-hee, yeah same here. I guess we've been used to the average 2.5 seconds setting then. Is #2 not about being able to setup this timing on a per-user basis? ^ ^