Revert "frame: Don't allow resizing of edges that are constrained"

This reverts commit 8a481b3e10.
This commit is contained in:
Florian Müllner 2016-01-10 15:16:06 +01:00
parent 8a481b3e10
commit 8071e5b149
3 changed files with 6 additions and 25 deletions

View File

@ -283,18 +283,6 @@ meta_frame_get_flags (MetaFrame *frame)
if (frame->window->wm_state_above)
flags |= META_FRAME_ABOVE;
if (frame->window->constrained_edges & META_DIRECTION_LEFT)
flags |= META_FRAME_CONSTRAINED_LEFT_EDGE;
if (frame->window->constrained_edges & META_DIRECTION_RIGHT)
flags |= META_FRAME_CONSTRAINED_RIGHT_EDGE;
if (frame->window->constrained_edges & META_DIRECTION_TOP)
flags |= META_FRAME_CONSTRAINED_TOP_EDGE;
if (frame->window->constrained_edges & META_DIRECTION_BOTTOM)
flags |= META_FRAME_CONSTRAINED_BOTTOM_EDGE;
return flags;
}

View File

@ -83,11 +83,7 @@ typedef enum
META_FRAME_IS_FLASHING = 1 << 14,
META_FRAME_ABOVE = 1 << 15,
META_FRAME_TILED_LEFT = 1 << 16,
META_FRAME_TILED_RIGHT = 1 << 17,
META_FRAME_CONSTRAINED_LEFT_EDGE = 1 << 18,
META_FRAME_CONSTRAINED_RIGHT_EDGE = 1 << 19,
META_FRAME_CONSTRAINED_TOP_EDGE = 1 << 20,
META_FRAME_CONSTRAINED_BOTTOM_EDGE = 1 << 21,
META_FRAME_TILED_RIGHT = 1 << 17
} MetaFrameFlags;
/**

View File

@ -94,22 +94,19 @@ meta_frame_layout_get_borders (const MetaFrameLayout *layout,
if (flags & META_FRAME_ALLOWS_HORIZONTAL_RESIZE)
{
if (!(flags & META_FRAME_CONSTRAINED_LEFT_EDGE))
borders->invisible.left = MAX (0, draggable_borders - borders->visible.left);
if (!(flags & META_FRAME_CONSTRAINED_RIGHT_EDGE))
borders->invisible.right = MAX (0, draggable_borders - borders->visible.right);
borders->invisible.left = MAX (0, draggable_borders - borders->visible.left);
borders->invisible.right = MAX (0, draggable_borders - borders->visible.right);
}
if (flags & META_FRAME_ALLOWS_VERTICAL_RESIZE)
{
borders->invisible.bottom = MAX (0, draggable_borders - borders->visible.bottom);
/* borders.visible.top is the height of the *title bar*. We can't do the same
* algorithm here, titlebars are expectedly much bigger. Just subtract a couple
* pixels to get a proper feel. */
if (!(flags & META_FRAME_CONSTRAINED_TOP_EDGE) && type != META_FRAME_TYPE_ATTACHED)
if (type != META_FRAME_TYPE_ATTACHED)
borders->invisible.top = MAX (0, draggable_borders - 2);
if (!(flags & META_FRAME_CONSTRAINED_BOTTOM_EDGE))
borders->invisible.bottom = MAX (0, draggable_borders - borders->visible.bottom);
}
borders->total.left = borders->invisible.left + borders->visible.left;