fix: mouse_hides_on_focus doesn't update with hotreload#376
Open
AdamGaskins wants to merge 2 commits into
Open
fix: mouse_hides_on_focus doesn't update with hotreload#376AdamGaskins wants to merge 2 commits into
AdamGaskins wants to merge 2 commits into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
mouse_hides_on_focus,focus_follows_mouseandmouse_follows_focusalong with anything gesture related in the config wouldn't update without fully restarting rift. (I actually thought the three finger sideways swipe was broken until today, because settingsettings.gestures.enabled=trueseemed to do nothing.)This PR fixes the two causes:
1.
EventTapandGestureTapwere not receiving config updates 8dfd619It looks like config reloads are initiated by
ConfigActor(either from a cli command, or viaConfigWatcher). Then the updated config values are passed along like so:graph LR; ConfigActor-->Reactor; Reactor-->WMController; WMController-->EventTap; WMController-->GestureTap;However, the Reactor was only passing along config updates when any keybinds had changed. Removing this condition allowed
EventTapandGestureTapto receive config updates.2. Mouse hiding is only enabled on startup adeaedc
In order for mouse hiding to work,
window_server::allow_hide_mouse()must be called. However, if rift is started withmouse_hides_on_focus=falsethenallow_hide_mouse()is never called even on subsequent config reloads. This commit callsallow_hide_mouse()the first timemouse_hides_on_focusis set totrue, whether that's on application start or when the config is reloaded.