summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAbhinav Prasai <abhinav.prsai@gmail.com>2025-08-25 00:06:23 +0100
committerAbhinav Prasai <abhinav.prsai@gmail.com>2025-08-25 00:06:23 +0100
commit130c09381563abee4d62ea7745db4e70fa3209fa (patch)
tree2d0f3f6e96b6b8ec178d579abdf3cb3b4120e4d5 /src
parenteff172a236cf84a0495ddc17384db1e341cd9fb6 (diff)
remove cached variable
there was no need, c (client variable) works fine
Diffstat (limited to 'src')
-rw-r--r--src/sxwm.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/sxwm.c b/src/sxwm.c
index cb25702..d76ffaf 100644
--- a/src/sxwm.c
+++ b/src/sxwm.c
@@ -382,18 +382,16 @@ void change_workspace(int ws)
}
/* if no scratchpad found focus regular window */
- Client *cached = NULL;
if (!focused && workspaces[current_ws]) {
for (Client *c = workspaces[current_ws]; c; c = c->next) {
/* TODO TEST */
- cached = c;
if (c->mon == current_mon) {
focused = c;
current_mon = c->mon;
break;
}
- focused = cached;
- current_mon = cached->mon;
+ focused = c;
+ current_mon = c->mon;
}
}