fix: error width for unfocused window in scroller layout

This commit is contained in:
DreamMaoMao 2025-03-16 13:45:14 +08:00
parent 886dcc57c2
commit dee9717fef
2 changed files with 5 additions and 3 deletions

View file

@ -1511,7 +1511,7 @@ applyrules(Client *c) {
r->animation_type_close == NULL ? c->animation_type_close : r->animation_type_close;
c->scroller_proportion = r->scroller_proportion > 0
? r->scroller_proportion
: scroller_default_proportion;
: c->scroller_proportion;
c->isnoborder = r->isnoborder > 0 ? r->isnoborder : c->isnoborder;
newtags = r->tags > 0 ? r->tags | newtags : newtags;
i = 0;
@ -5685,6 +5685,7 @@ void scroller(Monitor *m, unsigned int gappo, unsigned int gappi) {
for (i = 1; i <= focus_client_index; i++) {
c = tempClients[focus_client_index - i];
target_geom.width = max_client_width * c->scroller_proportion;
target_geom.x = tempClients[focus_client_index - i + 1]->geom.x - gappih -
target_geom.width;
resize(c, target_geom, 0);
@ -5692,6 +5693,7 @@ void scroller(Monitor *m, unsigned int gappo, unsigned int gappi) {
for (i = 1; i < n - focus_client_index; i++) {
c = tempClients[focus_client_index + i];
target_geom.width = max_client_width * c->scroller_proportion;
target_geom.x = tempClients[focus_client_index + i - 1]->geom.x + gappih +
tempClients[focus_client_index + i - 1]->geom.width;
resize(c, target_geom, 0);