[PATCH weston 3/3] shell: constrain resize grabs so titlebars don't go under the panel
Boyan Ding
stu_dby at 126.com
Wed Aug 20 20:42:03 PDT 2014
Hi,
On Wed, 2014-08-20 at 17:50 +0300, Pekka Paalanen wrote:
> Hi,
>
> on first glance, it looks like this completely ignores window rotation,
> but when I briefly tested on a rotated window, it seemed work well
> enough! :-o
>
> I can't figure out why.
>
> Now, Boyan's patch at least tries to take rotation into account:
> http://lists.freedesktop.org/archives/wayland-devel/2014-June/015658.html
> but will not work since I merged the two patches from Jonny, and needs
> a rebase if we choose it.
>
> Then there was the patch from Vivek:
> http://lists.freedesktop.org/archives/wayland-devel/2014-June/015528.html
> which I don't think handles rotated windows either? The same reason to
> rebase as for Boyan's patch.
>
> Were there others I missed?
>
> Boyan, can you see if Jonny's patch is right, or did I just not poke
> it the right way to make it break? Just merging that would be
> the easiest. If you don't like it, could you two agree on who makes the
> next one?
>
> Or do we just not care enough about rotated windows? :-)
> (I'd be fine with that, on resizing.)
After comparing mine and Jonny's patches the more carefully, I found the
patches' idea are different. Jonny's patch puts a "hard requirement"
that when expanding in height on the top edge, titlebar shouldn't go
under top panel or the resizing won't take effect (quite tricky here).
While mine will clamp the y-coordinate of cursor position if it's on the
panel.
I admit that my approach is somewhat too conservative. But there are
some tricky edge case under which Jonny's approach doesn't work very
well. Rotate a window clockwise 60-75 degrees, move it up until it can't
be moved further. You will find the top edge can't expand (actually
expanding the top edge here does no harm I think). More seriously,
You'll find that if you shrink the top edge a little, it can't resize
back! This behavior, in my opinion, is unacceptable, since too much
constraint is put on rotated windows.
Also, if you rotate a window 90 degrees and expand the edge that is now
on the top. It will go under the panel. This behavior isn't change by
Jonny's patch but will be changed by mine since I believe the cursor
position in panel shouldn't be used in resizing, regardless of which
edge we are resizing, at least a clamped coordinate should be used.
I think an ideal solution should surely ensure an unrotated window not
to be expanded under panel, but don't place too much restriction on
rotated windows.
What's your idea?
> Btw. it seems that rotated windows already have issues with move
> constraints. Try to open a window fairly big, rotate it 180 degrees,
> grab the window's bottom (which is now facing up), and resize the
> window to very short. Then, try to move the window around the desktop.
> I cannot move the window up past some arbitrary point in the middle of
> the desktop, while there clearly is room to move.
Yeah, I also noticed that. Maybe we should change that, too.
Cheers,
Boyan Ding
>
>
> Thanks,
> pq
> _______________________________________________
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/wayland-devel
More information about the wayland-devel
mailing list