fix: can't autoscroll when foucs change
This commit is contained in:
12
maomao.c
12
maomao.c
@@ -3095,8 +3095,8 @@ void focusclient(Client *c, int lift) {
|
|||||||
if (selmon) {
|
if (selmon) {
|
||||||
selmon->prevsel = selmon->sel;
|
selmon->prevsel = selmon->sel;
|
||||||
selmon->sel = c;
|
selmon->sel = c;
|
||||||
if (c && selmon->prevsel && selmon->prevsel->istiled &&
|
if (c && selmon->prevsel && !selmon->prevsel->isfloating &&
|
||||||
selmon->prevsel->tags == c->tags && c->istiled && !c->isfloating &&
|
selmon->prevsel->tags == c->tags && !c->isfloating &&
|
||||||
!c->isfullscreen &&
|
!c->isfullscreen &&
|
||||||
strcmp(selmon->pertag->ltidxs[selmon->pertag->curtag]->name,
|
strcmp(selmon->pertag->ltidxs[selmon->pertag->curtag]->name,
|
||||||
"scroller") == 0) {
|
"scroller") == 0) {
|
||||||
@@ -5704,11 +5704,11 @@ void scroller(Monitor *m, unsigned int gappo, unsigned int gappi) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m->sel && m->sel->istiled && !c->ismaxmizescreen &&
|
if (m->sel && !m->sel->isfloating && !m->sel->ismaxmizescreen &&
|
||||||
!c->isfullscreen) {
|
!m->sel->isfullscreen) {
|
||||||
root_client = m->sel;
|
root_client = m->sel;
|
||||||
} else if (m->prevsel && m->prevsel->istiled &&
|
} else if (m->prevsel && !m->prevsel->isfloating &&
|
||||||
!c->ismaxmizescreen && !c->isfullscreen) {
|
!m->prevsel->ismaxmizescreen && !m->prevsel->isfullscreen) {
|
||||||
root_client = m->prevsel;
|
root_client = m->prevsel;
|
||||||
} else {
|
} else {
|
||||||
wl_list_for_each(c, &clients, link) {
|
wl_list_for_each(c, &clients, link) {
|
||||||
|
|||||||
Reference in New Issue
Block a user