From 7b1e3a9d634bb48deb6e4bef6c373bbb6043b7fc Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Mon, 17 Jun 2019 14:05:15 +0200 Subject: [PATCH] window layouter: resize resizeable windows only Initiate the drag operation of a resize handle only if the client is known to be resizable. Issue #3303 --- repos/gems/src/app/window_layouter/window.h | 27 ++++++++++++--------- 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/repos/gems/src/app/window_layouter/window.h b/repos/gems/src/app/window_layouter/window.h index d82aca0b13..bab593ca04 100644 --- a/repos/gems/src/app/window_layouter/window.h +++ b/repos/gems/src/app/window_layouter/window.h @@ -187,21 +187,24 @@ class Window_layouter::Window : public List_model::Element { _dragged_element = element; - _drag_left_border = (element.type == Window::Element::LEFT) - || (element.type == Window::Element::TOP_LEFT) - || (element.type == Window::Element::BOTTOM_LEFT); + if (_resizeable) { - _drag_right_border = (element.type == Window::Element::RIGHT) - || (element.type == Window::Element::TOP_RIGHT) - || (element.type == Window::Element::BOTTOM_RIGHT); + _drag_left_border = (element.type == Window::Element::LEFT) + || (element.type == Window::Element::TOP_LEFT) + || (element.type == Window::Element::BOTTOM_LEFT); - _drag_top_border = (element.type == Window::Element::TOP) - || (element.type == Window::Element::TOP_LEFT) - || (element.type == Window::Element::TOP_RIGHT); + _drag_right_border = (element.type == Window::Element::RIGHT) + || (element.type == Window::Element::TOP_RIGHT) + || (element.type == Window::Element::BOTTOM_RIGHT); - _drag_bottom_border = (element.type == Window::Element::BOTTOM) - || (element.type == Window::Element::BOTTOM_LEFT) - || (element.type == Window::Element::BOTTOM_RIGHT); + _drag_top_border = (element.type == Window::Element::TOP) + || (element.type == Window::Element::TOP_LEFT) + || (element.type == Window::Element::TOP_RIGHT); + + _drag_bottom_border = (element.type == Window::Element::BOTTOM) + || (element.type == Window::Element::BOTTOM_LEFT) + || (element.type == Window::Element::BOTTOM_RIGHT); + } _orig_geometry = _geometry; _drag_geometry = _geometry;