Skip to content

Add option to timeout mouse pointer - #30

Open
taucher4000 wants to merge 1 commit into
puterboy:testingfrom
taucher4000:hide-mousepointer-1.0
Open

Add option to timeout mouse pointer#30
taucher4000 wants to merge 1 commit into
puterboy:testingfrom
taucher4000:hide-mousepointer-1.0

Conversation

@taucher4000

Copy link
Copy Markdown

I've added an option to be able to let the mouse pointer time out after defined seconds of idle. This is especially helpful for touch screens as you don't want to see the mouse pointer on touch screens. This has been already discussed in PR #24

@puterboy

Copy link
Copy Markdown
Owner

I made the mods BUT both the touchscreen and the mouse continue to unhide the pointer whereas based on the docs, I thought only the mouse would do so.
Do you have the same behavior?
Unless this is fixable, I will set the default timeout to 5 seconds.
And add that if the timeout is -1 then no pointer at all.

So:
timeout = -1 - Never pointer
timeout = 0 - Always pointer
timeout >0, then starts hidden and if becomes visible, rehides after timeout. But touch may also unhide

And changed naming to CURSOR_TIMEOUT

Please check the latest 'test' to validate it works for you.
If you have a better way to do this, let me know.

@taucher4000

Copy link
Copy Markdown
Author

sorry for the delay in my response. I've tested with my touch screen and the default 5 seconds timeout. The implementation works as expected. The curser started hidden and remains hidden. Thanks for merging.

@puterboy

Copy link
Copy Markdown
Owner

So to confirm, on your touchscreen it never reappears?

Wonder whether it is an issue with my touchscreen in that perhaps it also "acts" like a mouse too.

@taucher4000

taucher4000 commented Aug 22, 2025

Copy link
Copy Markdown
Author

Correct, it never reappears with my touchscreen.

I made the same test with a USB mouse, the cursor appears while moving and disappiers after the timeout.

@puterboy

puterboy commented Sep 3, 2025

Copy link
Copy Markdown
Owner

Any ideas on why it might not work for my touchscreen?

@taucher4000

Copy link
Copy Markdown
Author

Unfortunately not. The only reason I could think of is that your touch screen is actually identified as a mouse. This would explain why your touchscreen is behaving as you described. What screen do you use?

@GuntherSchulz01

Copy link
Copy Markdown

@puterboy
As far as I read, this is / was a YOU issue, @taucher4000 seems ok.

Is it still a problem?
Need help fixing / debugging?
Just forgot to close?

@puterboy

Copy link
Copy Markdown
Owner

Yes - it seems to be an issue with the screen I have and it persists.
I assume the issue is that the touchscreen is being recognized more as a physical mouse.
Haven't figured out how to solve it so keeping this open until I do.
TBH, I have focused for now more on issues affecting others as I can tolerate this though not ideal.

Keeping it open reminds me not to forget to tackle it :)

@GuntherSchulz01

Copy link
Copy Markdown

@puterboy , just some ideas below - see what works for you.

What device type does udevadm info /sys/class/input/eventX for your screen in addition to ID_INPUT=1?
My working actual touchscreen (DSI connector) reports:

E: ID_INPUT=1
E: ID_INPUT_TOUCHSCREEN=1
E: ID_INPUT_KEY=1

Whereas my unused, unconnected HDMI ports both report as:

E: ID_INPUT=1
E: ID_INPUT_POINTINGSTICK=1
E: ID_INPUT_KEY=1

From https://wayland.freedesktop.org/libinput/doc/1.7.1/udev_config.html, possible list was:
ID_INPUT_KEYBOARD, ID_INPUT_KEY, ID_INPUT_MOUSE, ID_INPUT_TOUCHPAD, ID_INPUT_TOUCHSCREEN, ID_INPUT_TABLET, ID_INPUT_JOYSTICK, ID_INPUT_ACCELEROMETER
Have you tried overriding type assignment as per same webpage, to make it less "mousey" and more "touchscreeney" or "touchpady" ?

Alternately, have you tried switching order of the input class entries in your xorg.conf for "libinput pointer" and "libinput touchscreen" to see if precedence on matching matters?

Alternately, test entirely suppressing your "libinput pointer" device class by blacklisting it (ref https://fedoraproject.org/wiki/Input_device_configuration#Blacklisting_a_device)

Or adding a MatchIsTouchpad / MatchIsTouchscreen / MatchIsJoystick "on" InputClass es? (ref https://fedoraproject.org/wiki/Input_device_configuration#InputClasses)

Try Option "Gesture" "off" in your matching InputClass (ref https://wiki.debian.org/TabletAndTouchScreen)

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

Successfully merging this pull request may close these issues.

3 participants