Skip to content

fix: mouse_hides_on_focus doesn't update with hotreload#376

Open
AdamGaskins wants to merge 2 commits into
acsandmann:mainfrom
AdamGaskins:fix/mouse-hiding-config-reload
Open

fix: mouse_hides_on_focus doesn't update with hotreload#376
AdamGaskins wants to merge 2 commits into
acsandmann:mainfrom
AdamGaskins:fix/mouse-hiding-config-reload

Conversation

@AdamGaskins

Copy link
Copy Markdown

mouse_hides_on_focus, focus_follows_mouse and mouse_follows_focus along 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 setting settings.gestures.enabled=true seemed to do nothing.)

This PR fixes the two causes:

1. EventTap and GestureTap were not receiving config updates 8dfd619

It looks like config reloads are initiated by ConfigActor (either from a cli command, or via ConfigWatcher). Then the updated config values are passed along like so:

graph LR;
    ConfigActor-->Reactor;
    Reactor-->WMController;
    WMController-->EventTap;
    WMController-->GestureTap;
Loading

However, the Reactor was only passing along config updates when any keybinds had changed. Removing this condition allowed EventTap and GestureTap to 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 with mouse_hides_on_focus=false then allow_hide_mouse() is never called even on subsequent config reloads. This commit calls allow_hide_mouse() the first time mouse_hides_on_focus is set to true, whether that's on application start or when the config is reloaded.

@AdamGaskins AdamGaskins changed the title Fix: mouse_hides_on_focus doesn't update with hotreload fix: mouse_hides_on_focus doesn't update with hotreload Jun 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant