squash! [wip] Add ToggleShade

Unshade views when starting interactive moves.
This commit is contained in:
Andrew J. Hesford 2024-01-15 10:35:22 -05:00
parent d7d3b9f845
commit 3a7d10993c
6 changed files with 23 additions and 10 deletions

View file

@ -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,