window: Allow resizing of tiled windows
Currently tiled windows are not resizable and their size is fixed to half the screen width. Adjust the code to work with fractions other than half, and allow users to adjust the split by dragging the window edge that is not constrained by a monitor edge. Follow-up patches will improve on that by resizing neighboring tiled windows by a shared edge, and making the functionality available to client-side decorated windows implementing the new edge constraints protocol.
This commit is contained in:

committed by
Georges Basile Stavracas Neto

parent
c7fa57cd28
commit
00a5db71cf
@ -1621,6 +1621,9 @@ get_control (MetaUIFrame *frame, int root_x, int root_y)
|
||||
has_vert = (flags & META_FRAME_ALLOWS_VERTICAL_RESIZE) != 0;
|
||||
has_horiz = (flags & META_FRAME_ALLOWS_HORIZONTAL_RESIZE) != 0;
|
||||
|
||||
if (flags & META_FRAME_TILED_LEFT || flags & META_FRAME_TILED_RIGHT)
|
||||
has_vert = has_horiz = FALSE;
|
||||
|
||||
if (POINT_IN_RECT (x, y, fgeom.title_rect))
|
||||
{
|
||||
if (has_vert && y <= TOP_RESIZE_HEIGHT && has_north_resize)
|
||||
@ -1693,12 +1696,12 @@ get_control (MetaUIFrame *frame, int root_x, int root_y)
|
||||
}
|
||||
else if (x <= fgeom.borders.total.left)
|
||||
{
|
||||
if (has_horiz)
|
||||
if (has_horiz || flags & META_FRAME_TILED_RIGHT)
|
||||
return META_FRAME_CONTROL_RESIZE_W;
|
||||
}
|
||||
else if (x >= (fgeom.width - fgeom.borders.total.right))
|
||||
{
|
||||
if (has_horiz)
|
||||
if (has_horiz || flags & META_FRAME_TILED_LEFT)
|
||||
return META_FRAME_CONTROL_RESIZE_E;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user