swpanel: Start with the first window when all are minimized

When all windows are minimized, the switch panel cursor is
initially on the second window in the list. With this patch
it will be on the first window.
This commit is contained in:
Nicolas Bonifas authored and Carlos R. Mafra committed 2009-08-22 13:03:56 +02:00
1 parent f79379c090
commit 3a0eb643d9
1 file changed
+6 -1
+6 -1
View File
@@ -126,7 +126,12 @@ void StartWindozeCycle(WWindow * wwin, XEvent * event, Bool next)
oldFocused = wwin;
if (swpanel) {
newFocused = wSwitchPanelSelectNext(swpanel, !next);
if (wwin->flags.mapped)
newFocused = wSwitchPanelSelectNext(swpanel, !next);
else
newFocused = wSwitchPanelSelectFirst(swpanel, False);
oldFocused = change_focus_and_raise(newFocused, oldFocused, swpanel, scr, False);
} else {
if (wwin->frame->workspace == scr->current_workspace)