mirror of
https://github.com/swaywm/sway.git
synced 2026-03-30 11:10:59 -04:00
fix remove_view_from_scratchpad
This commit is contained in:
parent
f99a653bd3
commit
52b9a62b31
3 changed files with 9 additions and 1 deletions
|
|
@ -141,12 +141,12 @@ void remove_view_from_scratchpad(swayc_t *view) {
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < scratchpad->length; i++) {
|
for (i = 0; i < scratchpad->length; i++) {
|
||||||
if (scratchpad->items[i] == view) {
|
if (scratchpad->items[i] == view) {
|
||||||
|
list_del(scratchpad, sp_index);
|
||||||
if (sp_index == 0) {
|
if (sp_index == 0) {
|
||||||
sp_index = scratchpad->length - 1;
|
sp_index = scratchpad->length - 1;
|
||||||
} else {
|
} else {
|
||||||
sp_index--;
|
sp_index--;
|
||||||
}
|
}
|
||||||
list_del(scratchpad, sp_index);
|
|
||||||
sp_view = NULL;
|
sp_view = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -869,6 +869,9 @@ void container_map(swayc_t *container, void (*f)(swayc_t *view, void *data), voi
|
||||||
void update_visibility_output(swayc_t *container, wlc_handle output) {
|
void update_visibility_output(swayc_t *container, wlc_handle output) {
|
||||||
// Inherit visibility
|
// Inherit visibility
|
||||||
swayc_t *parent = container->parent;
|
swayc_t *parent = container->parent;
|
||||||
|
if (parent == NULL) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
container->visible = parent->visible;
|
container->visible = parent->visible;
|
||||||
// special cases where visibility depends on focus
|
// special cases where visibility depends on focus
|
||||||
if (parent->type == C_OUTPUT || parent->layout == L_TABBED ||
|
if (parent->type == C_OUTPUT || parent->layout == L_TABBED ||
|
||||||
|
|
|
||||||
|
|
@ -72,6 +72,11 @@ void layout_log(const swayc_t *c, int depth) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (c->type == C_ROOT) {
|
||||||
|
fprintf(stderr,"ScratchPad\n");
|
||||||
|
for (int i = 0; i < scratchpad->length; ++i)
|
||||||
|
container_log(scratchpad->items[i], 0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *swayc_type_string(enum swayc_types type) {
|
const char *swayc_type_string(enum swayc_types type) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue