mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2025-10-29 05:40:21 -04:00
fix: error address for target client when build in release type
This commit is contained in:
parent
2cb55e64f6
commit
0e470da88a
1 changed files with 9 additions and 5 deletions
|
|
@ -94,6 +94,7 @@ void focusdir(const Arg *arg) {
|
||||||
void focuslast(const Arg *arg) {
|
void focuslast(const Arg *arg) {
|
||||||
|
|
||||||
Client *c = NULL;
|
Client *c = NULL;
|
||||||
|
Client *tc = NULL;
|
||||||
bool begin = false;
|
bool begin = false;
|
||||||
unsigned int target = 0;
|
unsigned int target = 0;
|
||||||
|
|
||||||
|
|
@ -104,6 +105,7 @@ void focuslast(const Arg *arg) {
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (selmon && !selmon->sel) {
|
if (selmon && !selmon->sel) {
|
||||||
|
tc = c;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -112,16 +114,18 @@ void focuslast(const Arg *arg) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (begin)
|
if (begin) {
|
||||||
|
tc = c;
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!c || !client_surface(c)->mapped)
|
if (!tc || !client_surface(tc)->mapped)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if ((int)c->tags > 0) {
|
if ((int)tc->tags > 0) {
|
||||||
focusclient(c, 1);
|
focusclient(tc, 1);
|
||||||
target = get_tags_first_tag(c->tags);
|
target = get_tags_first_tag(tc->tags);
|
||||||
view(&(Arg){.ui = target}, true);
|
view(&(Arg){.ui = target}, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue