1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-21 05:18:06 +01:00

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.
This commit is contained in:
Iain Patterson
2013-05-24 14:14:34 +01:00
committed by Carlos R. Mafra
parent 89a6476a33
commit dd8d320619

View File

@@ -625,12 +625,16 @@ WWindow *wSwitchPanelSelectFirst(WSwitchPanel *panel, int back)
{ {
WWindow *wwin; WWindow *wwin;
int count = WMGetArrayItemCount(panel->windows); int count = WMGetArrayItemCount(panel->windows);
int i;
if (count == 0) if (count == 0)
return NULL; return NULL;
if (panel->win) if (panel->win) {
changeImage(panel, panel->current, 0, False); WM_ITERATE_ARRAY(panel->windows, wwin, i) {
changeImage(panel, i, 0, False);
}
}
if (back) { if (back) {
panel->current = count - 1; panel->current = count - 1;
@@ -671,7 +675,9 @@ WWindow *wSwitchPanelHandleEvent(WSwitchPanel *panel, XEvent *event)
if (focus >= 0 && panel->current != focus) { if (focus >= 0 && panel->current != focus) {
WWindow *wwin; 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); changeImage(panel, focus, 1, False);
panel->current = focus; panel->current = focus;