From a468af073640cc4d9e9b0301b1db6b73390adf2d Mon Sep 17 00:00:00 2001 From: Nik-Sch Date: Tue, 26 Jan 2021 13:28:24 +0100 Subject: [PATCH] honor_size_hints not for tiled windows (fix #496) --- src/pointer.c | 3 ++- src/window.c | 6 +----- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/pointer.c b/src/pointer.c index 5eb93c34..d92550c7 100644 --- a/src/pointer.c +++ b/src/pointer.c @@ -289,7 +289,8 @@ void track_pointer(coordinates_t loc, pointer_action_t pac, xcb_point_t pos) if (pac == ACTION_MOVE) { move_client(&loc, dx, dy); } else { - if (honor_size_hints) { + + if (honor_size_hints && grabbed_node != NULL && grabbed_node->client->state != STATE_TILED) { resize_client(&loc, rh, e->root_x, e->root_y, false); } else { resize_client(&loc, rh, dx, dy, true); diff --git a/src/window.c b/src/window.c index cd2340df..5ad49c37 100644 --- a/src/window.c +++ b/src/window.c @@ -632,17 +632,13 @@ bool resize_client(coordinates_t *loc, resize_handle_t rh, int dx, int dy, bool /* taken from awesomeWM */ void apply_size_hints(client_t *c, uint16_t *width, uint16_t *height) { - if (!honor_size_hints) { + if (!honor_size_hints || c->state == STATE_FULLSCREEN || c->state == STATE_TILED) { return; } int32_t minw = 0, minh = 0; int32_t basew = 0, baseh = 0, real_basew = 0, real_baseh = 0; - if (c->state == STATE_FULLSCREEN) { - return; - } - if (c->size_hints.flags & XCB_ICCCM_SIZE_HINT_BASE_SIZE) { basew = c->size_hints.base_width; baseh = c->size_hints.base_height;