fix: error address for target client when build in release type

This commit is contained in:
DreamMaoMao 2025-09-28 14:09:38 +08:00
parent 2cb55e64f6
commit 0e470da88a

View file

@ -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);
} }
} }