I have a kiosk application running on Ubuntu Server 14.04.3 with Google Chrome and X display (xorg and xsession).
Currently I have some script to hide the mouse after 2 seconds of being idle and when the user attempts to move the mouse it appears. I simply leverage the cursor:none
on an injected invisible overlay and remove that overlay when needed.
It seems like when I boot up the kiosk the code executes as expected and I can see the overlay inserted but since the mouse was just "loaded" it won't disappear until I make even a minor movement with it. It seems like the browser doesn't detect the mouse until I make even a minor movement with it which results in the mouse being shown at the middle of the screen. Since the problem isn't related to my code as it seems to execute just fine.
What I want to do is that if the mouse hasn't been moved for 2 seconds, hide it. When the user attempts to move the mouse, show it once again. The solution has to work immediately after booting the X display, so when I boot the X display the mouse is at the middle of the screen and even if I don't touch it at boot it will disappear after 2 seconds of being idle. I guess I need to achieve this by tinkering with the X display instead of relying on my code since the mouse isn't detected when the kiosk is freshly booted.
Is it possible doing such a thing with X display?