From 3a0eb643d95af8dfac75b2306141d2007325b63f Mon Sep 17 00:00:00 2001 From: Nicolas Bonifas Date: Sat, 22 Aug 2009 12:24:58 +0200 Subject: [PATCH] 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. --- src/cycling.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/cycling.c b/src/cycling.c index 0f2b807b..df067cf9 100644 --- a/src/cycling.c +++ b/src/cycling.c @@ -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)