From 8071e5b149164b730497fa377877da89f0699e14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Sun, 10 Jan 2016 15:16:06 +0100 Subject: [PATCH] Revert "frame: Don't allow resizing of edges that are constrained" This reverts commit 8a481b3e1039f58067293132777c80c061a63b72. --- src/core/frame.c | 12 ------------ src/meta/common.h | 6 +----- src/ui/theme.c | 13 +++++-------- 3 files changed, 6 insertions(+), 25 deletions(-) diff --git a/src/core/frame.c b/src/core/frame.c index 81e0e68bc..c4be91a89 100644 --- a/src/core/frame.c +++ b/src/core/frame.c @@ -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; } diff --git a/src/meta/common.h b/src/meta/common.h index 50e69a0ff..19bbc3c56 100644 --- a/src/meta/common.h +++ b/src/meta/common.h @@ -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; /** diff --git a/src/ui/theme.c b/src/ui/theme.c index 530a2c6cd..1f33c3e53 100644 --- a/src/ui/theme.c +++ b/src/ui/theme.c @@ -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;