Bug 470105 - Hide mouse cursor after period of inactivity
Summary: Hide mouse cursor after period of inactivity
Status: RESOLVED INTENTIONAL
Alias: None
Product: kwin
Classification: Plasma
Component: wayland-generic (other bugs)
Version First Reported In: 5.27.5
Platform: Gentoo Packages Linux
: NOR wishlist
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords: usability, wayland-only
Depends on:
Blocks:
 
Reported: 2023-05-22 06:39 UTC by rb
Modified: 2023-05-23 17:57 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:
rb0171610: Wayland+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description rb 2023-05-22 06:39:22 UTC
SUMMARY
With X11, a separate program was required to hide mouse cursor (make invisible) after a period of inactivity (e.g. 5 seconds).  Mouse pointer would reappear upon movement of the mouse.  This application was called unclutter and was later changed to unclutter-xfixes.  This auto hiding behavior is the default behavior on Windows.   
With Wayland, hiding of the mouse pointer is only available if the compositor specifically is written to allow it.
If Wayland is to become the default on KDE 6, it would be nice to have checkbox option to hide mouse pointer after period of inactivity in KDE System Settings > Input > Mouse or similar.
The ever present mouse pointer is troublesome if you are reading documents, scripting, etc.  Also, users coming from windows find it difficult to ignore.  I find it distracting.  I have used unclutter to hide mouse for 18 years at least ( possibly since KDE 3.5).  I'd hate to see this auto-hide behavior completely disappear because of migration to Wayland.
Comment 1 Nate Graham 2023-05-22 20:16:17 UTC
> troublesome if you are reading documents, scripting, etc
That's typically why content apps hide the cursor when they're interacted with using the keyboard. If they don't... they should! This is much nicer than a timer system to hide the cursor after some period of inactivity; when I start navigating via the keyboard in a document reader app like Okular, I'd want the cursor hidden *now*, not in five minutes!

It sounds like you're using a piece of 3rd-party software to workaround such issues in apps. I can understand that you found a solution that works for you, but as you've observed, it won't work on Wayland.

In general, it's best when issues in apps are fixed in apps, rather than worked around elsewhere. I think it's time for you to report bugs against the apps that don't behave as you'd like. That way eventually those issues can be fixed and then you won't need this workaround. And the issues will ultimately be fixed for others, as well.

Beyond that, the requested behavior is probably possible to implement via a KWin script, but I don't think there's any interest in adding it as a 1st-party supported feature, sorry/
Comment 2 rb 2023-05-22 21:04:41 UTC
(In reply to Nate Graham from comment #1)
> > troublesome if you are reading documents, scripting, etc
> That's typically why content apps hide the cursor when they're interacted
> with using the keyboard. If they don't... they should! This is much nicer
> than a timer system to hide the cursor after some period of inactivity; when
> I start navigating via the keyboard in a document reader app like Okular,
> I'd want the cursor hidden *now*, not in five minutes!
> 
> It sounds like you're using a piece of 3rd-party software to workaround such
> issues in apps. I can understand that you found a solution that works for
> you, but as you've observed, it won't work on Wayland.
> 
> In general, it's best when issues in apps are fixed in apps, rather than
> worked around elsewhere. I think it's time for you to report bugs against
> the apps that don't behave as you'd like. That way eventually those issues
> can be fixed and then you won't need this workaround. And the issues will
> ultimately be fixed for others, as well.
> 
> Beyond that, the requested behavior is probably possible to implement via a
> KWin script, but I don't think there's any interest in adding it as a
> 1st-party supported feature, sorry/

While I respect your position,I think you are failing to grasp the lack of feature.  The issues are not in apps, its with KDE desktop, system settings etc.  When logging into windows, the mouse automatically disappears within a few seconds if not being used.  It reappears when the mouse is moved.  It would be nice if this behavior could be implemented in the KDE Desktop.  It is not related to keyboard use.  It is independent of keyboard use.   If it is not doable in Wayland, I get it.  KDE users have been using it for years to get mouse pointer behavior that is typical in other environments, specifically Windows.
Comment 3 Nate Graham 2023-05-23 17:11:12 UTC
I think it is an issue in apps. Because hiding the cursor after inactivity doesn't make sense everywhere, but rather only in certain places. We already have some of evidence that people have trouble finding the cursor even when it *is* visible. So I wouldn't want to make that problem worse.

If the cursor automatically hides after inactivity on Windows, that sounds like a really bizarre default behavior to me. I just booted up my Windows 10 PC and it doesn't seem to happen there, FWIW. The cursor is hidden at login until moved once, but thereafter, it remains visible even after 20 minutes of inactivity. Was this newly-introduced for Windows 11? Or is it something you've done for your Windows systems via a similar piece of 3rd-party functionality and forgot about it, maybe?

And again, this is probably already possible via a KWin script, so I think that's the path forward here.
Comment 4 rb 2023-05-23 17:36:49 UTC
Valid points.  I was wrong about Windows, I apologize.
The current pointer behavior is similar to Windows.
I am getting used to doing without the option to hide mouse pointer 
after inactivity in KDE

that was a feature of xfixes/X11.   Apps have improved in this area in 
20 years and I did not notice because I was hiding the pointer

anyway.  It is a non-issue.

Thank you for your time Nate and all your

Team for all the hard work you do.


On 5/23/23 1:11 PM, Nate Graham wrote:
> https://bugs.kde.org/show_bug.cgi?id=470105
>
> --- Comment #3 from Nate Graham <nate@kde.org> ---
> I think it is an issue in apps. Because hiding the cursor after inactivity
> doesn't make sense everywhere, but rather only in certain places. We already
> have some of evidence that people have trouble finding the cursor even when it
> *is* visible. So I wouldn't want to make that problem worse.
>
> If the cursor automatically hides after inactivity on Windows, that sounds like
> a really bizarre default behavior to me. I just booted up my Windows 10 PC and
> it doesn't seem to happen there, FWIW. The cursor is hidden at login until
> moved once, but thereafter, it remains visible even after 20 minutes of
> inactivity. Was this newly-introduced for Windows 11? Or is it something you've
> done for your Windows systems via a similar piece of 3rd-party functionality
> and forgot about it, maybe?
>
> And again, this is probably already possible via a KWin script, so I think
> that's the path forward here.
>
Comment 5 Nate Graham 2023-05-23 17:45:26 UTC
You're welcome, and thanks for understanding!

Again, it may be possible to implement it as  KWin script, so hopefully all hope is not lost. :)
Comment 6 rb 2023-05-23 17:57:43 UTC
In the meantime, there is an open source Interception Tools:
"A minimal composable infrastructure on top of libudev and libevdev"
that works in Wayland.  It has a mouse hiding plugin

"hideaway" move the mouse pointer out of sight after a couple of seconds.

Source, Arch, Void, Ubuntu, Fedora.  I will give that a try.
Thanks again.