bugfix: allow cycling back in uicb_setlayout()
This commit is contained in:
parent
9ec4e30a85
commit
0792d6c5ac
4
layout.c
4
layout.c
|
@ -175,8 +175,10 @@ uicb_setlayout(Display *disp,
|
||||||
{
|
{
|
||||||
for(i = 0; i < awesomeconf->nlayouts && &awesomeconf->layouts[i] != awesomeconf->current_layout; i++);
|
for(i = 0; i < awesomeconf->nlayouts && &awesomeconf->layouts[i] != awesomeconf->current_layout; i++);
|
||||||
i = compute_new_value_from_arg(arg, (double) i);
|
i = compute_new_value_from_arg(arg, (double) i);
|
||||||
if(i < 0 || i >= awesomeconf->nlayouts)
|
if(i >= awesomeconf->nlayouts)
|
||||||
i = 0;
|
i = 0;
|
||||||
|
else if(i < 0)
|
||||||
|
i = awesomeconf->nlayouts - 1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
i = 0;
|
i = 0;
|
||||||
|
|
Loading…
Reference in New Issue