-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
wayland: fix vertical resize #11420
wayland: fix vertical resize #11420
Conversation
The second commit was more along the lines of what I was thinking but you should choose based on which dimension has the larger absolute value difference since both can change. Edit: possible third approach just popped in to my head. Maybe just MPSWAP it, do the calculation and then MPSWAP it back? |
54a4c01
to
8e8653d
Compare
The |
8e8653d
to
1ac9d86
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.
Looks reasonable enough.
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.
Now that I actually tested this (on sway). It unexpectedly doesn't work at all and regresses resizing in the horizontal direction even. I presume this worked for you on plasma so that is weird. We'll need a different approach (no good ideas atm).
When resizing vertically or horizontally I can only make the window bigger, but when resizing both (corner with border) I can also make it smaller 😕. I'm pretty sure that used to work, maybe the change to |
This is a surprisingly difficult problem to solve... seemingly impossible really. |
The calculation was only implemented for horizontal resize, now it works with vertical resize as well.
1ac9d86
to
3a47793
Compare
I think I found a way to make it behave how it should by keeping track of the kind of resize in the wayland state. Edit: I already found a bug where after a diagonal resize it sometimes doesn't let the window get smaller in a vertical resize, but when trying again it works. It probably doesn't reliably reset the resize state. |
Succeeded by #11420 instead. |
The first implementation is really ugly, so I tried it a different way. I'm not sure it's actually preferable over the first attempt, so I made it a separate commit to compare.