How to handle mouse cursor (show/hide) inside a chrome.app.window

1,530 views
Skip to first unread message

Luigino De Togni

unread,
Apr 18, 2014, 4:39:18 AM4/18/14
to chromi...@chromium.org
Hi,
i'm searching for a way/chrome api to hide the mouse cursor inside a chrome window (my project is a packaged app)

Somebody can suggest me a solution?

Thank you very much

Lewix

Tim Caswell

unread,
Apr 18, 2014, 10:48:00 AM4/18/14
to Luigino De Togni, Chromium Apps
If you're writing a full-screen game, you can capture the mouse.  I've not heard of a way to simply hide the cursor when it's over a window though.



--
You received this message because you are subscribed to the Google Groups "Chromium Apps" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-app...@chromium.org.
To post to this group, send email to chromi...@chromium.org.
Visit this group at http://groups.google.com/a/chromium.org/group/chromium-apps/.
For more options, visit https://groups.google.com/a/chromium.org/d/optout.

Message has been deleted

Luigino De Togni

unread,
Apr 18, 2014, 12:35:29 PM4/18/14
to chromi...@chromium.org, Tim Caswell
I think i have found a simple solution using css like

html {
    cursor: none;
}


Il giorno venerdì 18 aprile 2014 18:28:52 UTC+2, Luigino De Togni ha scritto:
Hi,
thank you for your suggestion

I think better/other documentation is here

https://developer.mozilla.org/en-US/docs/WebAPI/Pointer_Lock

but seems (during my tests) mouse hiding is allowed only by a user interaction and not automatically, example by window.onLoad


Lewix




If you're writing a full-screen game, you can capture the mouse.  I've not heard of a way to simply hide the cursor when it's over a window though.

Reply all
Reply to author
Forward
0 new messages