-
-
Notifications
You must be signed in to change notification settings - Fork 109
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use the move bar to freely position windows #1670
base: main
Are you sure you want to change the base?
Conversation
3055f69
to
9365a24
Compare
Demo of the new behaviour movingwindows28.mp4Compare it to what was happening previously ScreenRecording_2024.12.02-12.17.59.mp4 |
@svillar This is a great improvement! It is a pity that the window moves downward when clicking the first time. Maybe we need to apply a transform taking into account the hit point where the click has happened in the window widget. I've had a look at the code and I think that we can gather all the information that we need, but it seems a bit complex to implement. It would be awesome to implement the grab button as well, but we can leave that for another PR. |
Yeah, I agree is the main drawback. Should we land this as is, or do you prefer to fix this issue first.
Yeah, I think we can treat it as an enhancement |
efe0bc7
to
ed83245
Compare
It's quite annoying, tbh. I have mixed feelings, because the feature is nice and something users have been requested since long ago. How difficult would it be to fix ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. The feature works well enough, I think. We can leave the improvements (window "jump", etc.) for future PRs.
Not trivial at least. I can give it a try though |
BTW, this change causes a regression in the headklock functionality. It's not possible to lock the window based on the headset orientation. |
It works fine here. See the video: headlock.mp4 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The fix for the headlock regression worked, thanks.
I have some comments about the code, see below inline.
0a84081
to
eec1a8c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code looks good now.
In terms of functionality, this new version works much better now. Awesome ! The z-axis movement is fluid and clear now, and it's more stable as it's not affected by unconscious movements on the other axes.
On the bad news, I've found out a bug, which I don't think it's a regression but something this PR has not considered. When enabling the headlock, it's still possible to touch the "free movement" bar and start moving the window. The headlock is stopped, but the radio-button in the settings dialog is still enabled.
Users should be able to move the windows around (although the 3 windows will still be grouped together) by clicking and dragging in the recently added move bar bellow the browser window. This required a small refactoring in head lock mode. From now on, instead of having a head lock on/off switch, we have a head lock mode, which can take three different values: no lock (normal mode), head lock and controller lock (the one used to move windows). Fixes #99, fixes #927
Currently when moving windows, they closely follow the orientation of the controller. That means that they are prone to the natural small shaking of human hands. To alleviate that, we can add some linear interpolation between consecutive orientations. By using a value close to 0 (in this case 0.1) we ensure that the interpolated value is very close to the previous value, and thus, the movement is very smooth.
Users can now modify the distante to the browser window when dragging the moving bar widget by moving the controller/hand closer or further away. As this can be done with a gesture now there is no need to have a dedicated widget in the settings for that.
eec1a8c
to
d3c61b2
Compare
Good catch. Fixed now |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's perfect now. Thanks !
d4eae53
to
cc3b4cf
Compare
cc3b4cf
to
67a8d45
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested the change to avoid the big initial repositioning and it's not better. It places the window slightly upper the current position, which is better than downwards. Ideally, I'd try to reduce the distance, though.
Anyway, since this is a temporary solution, I think we can live until we solved it properly.
Users should be able to move the windows around (although the 3 windows will still be grouped together) by clicking and dragging in the recently added move bar bellow the window.
Window distance to the user would require additional changes and it is not included in this PR
Fixes #99, fixes #927