Igalia / wolvic

A fast and secure browser for standalone virtual-reality and augmented-reality headsets.
https://wolvic.org
Mozilla Public License 2.0
813 stars 105 forks source link

Use doApply for setHeadLock and setWindowMovement #1210

Closed HollowMan6 closed 9 months ago

HollowMan6 commented 9 months ago

We shouldn't set the value when we just want to update the UI. Also, we should check the value manually before we call set instead of simply calling them since setting values can cause unnecessary side effects on the UI (e.g. reorientation).

On a freshly installed Wolvic without any user data:

https://github.com/Igalia/wolvic/assets/43995067/032dc423-fee8-4c48-90bc-4be48e053bbd

HollowMan6 commented 9 months ago

PS: I know ideally we should use enum instead of a boolean for parameters, but given the coding style we already have in the project, I would suggest we change this one-off if later anyone finds this necessary.

svillar commented 9 months ago

PS: I know ideally we should use enum instead of a boolean for parameters, but given the coding style we already have in the project, I would suggest we change this one-off if later anyone finds this necessary.

I agree with you