Fix scratchpad segmentation fault
This commit is contained in:
+4
-3
@@ -114,15 +114,16 @@ void swapdirscratchpad(const Arg *arg) {
|
|||||||
|
|
||||||
if (sel->isscratchpad) {
|
if (sel->isscratchpad) {
|
||||||
/* Move FROM scratchpad to current workspace */
|
/* Move FROM scratchpad to current workspace */
|
||||||
Client *next = nullptr;
|
Client *next = nullptr, *n;
|
||||||
sel->isscratchpad = 0;
|
sel->isscratchpad = 0;
|
||||||
sel->isfloating = 0;
|
sel->isfloating = 0;
|
||||||
sel->tags = selmon->tagset[selmon->seltags];
|
sel->tags = selmon->tagset[selmon->seltags];
|
||||||
if (selmon->scratchpad_visible) {
|
if (selmon->scratchpad_visible) {
|
||||||
/* Find another scratchpad client to show */
|
/* Find another scratchpad client to show */
|
||||||
wl_list_for_each(next, &fstack, flink) {
|
wl_list_for_each(n, &fstack, flink) {
|
||||||
if (next != sel && next->isscratchpad && next->mon == selmon) {
|
if (n != sel && n->isscratchpad && n->mon == selmon) {
|
||||||
scratchpad_arrange(selmon);
|
scratchpad_arrange(selmon);
|
||||||
|
next = n;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user