ssd: fix always-on-top button state update

This commit is contained in:
chocolatemintychip 2026-04-20 01:33:20 +02:00
parent 838113cc44
commit 0aaf7d3cb9
2 changed files with 3 additions and 1 deletions

View file

@ -299,7 +299,7 @@ ssd_titlebar_update(struct ssd *ssd)
ssd->state.was_omnipresent = view->visible_on_all_workspaces;
}
printf("%d\n\n",ssd->state.was_ontop);
printf("%d-%d-%d\n",ssd->state.was_ontop, view->layer,VIEW_LAYER_ALWAYS_ON_TOP);
if (ssd->state.was_ontop != (view->layer == VIEW_LAYER_ALWAYS_ON_TOP)) {
set_alt_button_icon(ssd, LAB_NODE_BUTTON_ONTOP,

View file

@ -1562,6 +1562,8 @@ view_toggle_always_on_top(struct view *view)
} else {
view_set_layer(view, VIEW_LAYER_ALWAYS_ON_TOP);
}
// Hack to update always-on-top ssd button state. May be wasteful, idk.
ssd_update_geometry(view->ssd);
}
void