Make mouse locking optional#518
Conversation
|
As the linked bug-report on Chrome OS tracker doesn't seem like it's going anywhere soon, I'd like to merge this PR if possible. On the failed appveyor build, I believe that's an existing issue with bundled Google cert expiring, if I remove the lines forcing the use of the bundled cert the build works fine on my machine. Thanks |
index.html
Outdated
| <i class="mdl-icon-toggle__label material-icons">mouse</i> | ||
| </label> | ||
| <div id="mouseLockTooltip" class="mdl-tooltip" for="mouseLockBtn"> | ||
| Enable mouseLocking (must disable to use tap-to-click on touchpads) |
There was a problem hiding this comment.
"mouseLocking" -> "mouse locking"
input.cpp
Outdated
| case PP_INPUTEVENT_TYPE_MOUSEDOWN: { | ||
| // Lock the mouse cursor when the user clicks on the stream | ||
| if (!m_MouseLocked) { | ||
| if (m_MouseLockingFeatureEnabled && !m_MouseLocked) { |
There was a problem hiding this comment.
We should still provide toggleable input capture behavior like what Moonlight Qt does when in remote desktop mouse mode, otherwise it is impossible to uncapture input to use the shortcut keys required to exit fullscreen.
When mouse locking is disabled and the user presses Ctrl+Alt+Shift, we should:
- Toggle cursor visibility
- Toggle ignoring keyboard and mouse input
There was a problem hiding this comment.
Thanks for your feedback. I'm happy to implement the change, but personally I've not used the Ctrl+Alt+Shift shortcut as both of my chromebooks (and so I assumed all chromebooks) feature function keys to toggle the fullscreen and window-switching functionality, which I found a more obvious way to navigate.
Previously Ctrl+Alt+Shift+Q would leave the `m_WaitingForAllModifiersUp` flag set, causing a reconnect to lose-focus on first key-up event.
Make mouse locking optional
Mouse-locking breaks tap-to-click functionality on a chromebook's touchpad (see https://bugs.chromium.org/p/chromium/issues/detail?id=1335564). My primary use-case are point-and-click games which do not rely on infinite mouse movement but only on absolute mouse position on-screen. Hence I would like to make mouse-locking optional in moonlight.
Changes proposed in this pull request:
@moonlight-stream