From dd8d320619316e3ca9361f03366fde906f4be100 Mon Sep 17 00:00:00 2001 From: Iain Patterson Date: Fri, 24 May 2013 14:14:34 +0100 Subject: [PATCH] Undim switchpanel icons when selecting windows directly. If one or more icons were dimmed in the switchpanel because the user used GroupNext/PrevKey, then an icon was selected with the mouse or the Home or End keys, dimmed icons remained dim. That could be unintuitive if the selected window was of a different class. Instead we now always redraw all icons when highlighting a different icon. --- src/switchpanel.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/switchpanel.c b/src/switchpanel.c index 6c8f6eaa..cfb00332 100644 --- a/src/switchpanel.c +++ b/src/switchpanel.c @@ -625,12 +625,16 @@ WWindow *wSwitchPanelSelectFirst(WSwitchPanel *panel, int back) { WWindow *wwin; int count = WMGetArrayItemCount(panel->windows); + int i; if (count == 0) return NULL; - if (panel->win) - changeImage(panel, panel->current, 0, False); + if (panel->win) { + WM_ITERATE_ARRAY(panel->windows, wwin, i) { + changeImage(panel, i, 0, False); + } + } if (back) { panel->current = count - 1; @@ -671,7 +675,9 @@ WWindow *wSwitchPanelHandleEvent(WSwitchPanel *panel, XEvent *event) if (focus >= 0 && panel->current != focus) { WWindow *wwin; - changeImage(panel, panel->current, 0, False); + WM_ITERATE_ARRAY(panel->windows, wwin, i) { + changeImage(panel, i, 0, False); + } changeImage(panel, focus, 1, False); panel->current = focus; -- 2.11.4.GIT