diff --git a/src/action.c b/src/action.c index ef01310e..d9b46866 100644 --- a/src/action.c +++ b/src/action.c @@ -847,6 +847,7 @@ actions_run(struct view *activator, struct server *server, .width = width ? : view->pending.width, .height = height ? : view->pending.height, }; + view_set_shade(view, false); view_move_resize(view, box); } break; diff --git a/src/interactive.c b/src/interactive.c index d6672efe..0a4e1818 100644 --- a/src/interactive.c +++ b/src/interactive.c @@ -55,7 +55,8 @@ interactive_begin(struct view *view, enum input_mode mode, uint32_t edges) } if (!view_is_floating(view)) { /* - * Un-maximize and restore natural width/height. + * Un-maximize, unshade and restore natural + * width/height. * Don't reset tiled state yet since we may want * to keep it (in the snap-to-maximize case). */ @@ -66,6 +67,8 @@ interactive_begin(struct view *view, enum input_mode mode, uint32_t edges) geometry.y = max_move_scale(seat->cursor->y, view->current.y, view->current.height, geometry.height); + + view_set_shade(view, false); view_restore_to(view, geometry); } else { /* Store natural geometry at start of move */ diff --git a/src/ssd/resize_indicator.c b/src/ssd/resize_indicator.c index 6af18fcd..e140886d 100644 --- a/src/ssd/resize_indicator.c +++ b/src/ssd/resize_indicator.c @@ -159,14 +159,15 @@ resize_indicator_update(struct view *view) char text[32]; /* 12345 x 12345 would be 13 chars + 1 null byte */ - int eff_height = view_effective_height(view, false); + int eff_height = view_effective_height(view, /* use_pending */ false); + int eff_width = view->current.width; switch (view->server->input_mode) { case LAB_INPUT_STATE_RESIZE: ; /* works around "a label can only be part of a statement" */ struct view_size_hints hints = view_get_size_hints(view); snprintf(text, sizeof(text), "%d x %d", - MAX(0, view->current.width - hints.base_width) + MAX(0, eff_width - hints.base_width) / MAX(1, hints.width_inc), MAX(0, eff_height - hints.base_height) / MAX(1, hints.height_inc)); @@ -194,7 +195,7 @@ resize_indicator_update(struct view *view) /* Center the indicator in the window */ wlr_scene_node_set_position(&indicator->tree->node, - (view->current.width - indicator->width) / 2, + (eff_width - indicator->width) / 2, (eff_height - indicator->height) / 2); scaled_font_buffer_update(indicator->text, text, width, &rc.font_osd, diff --git a/src/ssd/ssd.c b/src/ssd/ssd.c index 9604098c..dd7f1b60 100644 --- a/src/ssd/ssd.c +++ b/src/ssd/ssd.c @@ -61,11 +61,15 @@ ssd_max_extents(struct view *view) { assert(view); struct border border = ssd_thickness(view); + + int eff_width = view->current.width; + int eff_height = view_effective_height(view, /* use_pending */ false); + return (struct wlr_box){ .x = view->current.x - border.left, .y = view->current.y - border.top, - .width = view->current.width + border.left + border.right, - .height = view->current.height + border.top + border.bottom, + .width = eff_width + border.left + border.right, + .height = eff_height + border.top + border.bottom, }; } @@ -220,7 +224,11 @@ ssd_update_geometry(struct ssd *ssd) struct wlr_box cached = ssd->state.geometry; struct wlr_box current = ssd->view->current; - if (current.width == cached.width && current.height == cached.height) { + + int eff_width = current.width; + int eff_height = view_effective_height(ssd->view, /* use_pending */ false); + + if (eff_width == cached.width && eff_height == cached.height) { if (current.x != cached.x || current.y != cached.y) { /* Dynamically resize extents based on position and usable_area */ ssd_extents_update(ssd); diff --git a/src/ssd/ssd_border.c b/src/ssd/ssd_border.c index 6c9db9b1..74f29ffa 100644 --- a/src/ssd/ssd_border.c +++ b/src/ssd/ssd_border.c @@ -20,7 +20,7 @@ ssd_border_create(struct ssd *ssd) struct view *view = ssd->view; struct theme *theme = view->server->theme; int width = view->current.width; - int height = view_effective_height(view, false); + int height = view_effective_height(view, /* use_pending */ false); int full_width = width + 2 * theme->border_width; float *color; @@ -83,7 +83,7 @@ ssd_border_update(struct ssd *ssd) struct theme *theme = view->server->theme; int width = view->current.width; - int height = view_effective_height(view, false); + int height = view_effective_height(view, /* use_pending */ false); int full_width = width + 2 * theme->border_width; struct ssd_part *part; diff --git a/src/ssd/ssd_extents.c b/src/ssd/ssd_extents.c index 22bfa579..9a926a2b 100644 --- a/src/ssd/ssd_extents.c +++ b/src/ssd/ssd_extents.c @@ -109,7 +109,7 @@ ssd_extents_update(struct ssd *ssd) struct theme *theme = view->server->theme; int width = view->current.width; - int height = view->current.height; + int height = view_effective_height(view, /* use_pending */ false); int full_height = height + theme->border_width * 2 + ssd->titlebar.height; int full_width = width + 2 * theme->border_width; int extended_area = SSD_EXTENDED_AREA;