mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-20 21:08:08 +01:00
- added WMRemoveFromArrayMatching(array, match, cdata), which will remove the
first element in the array that is matched by match(item, cdata)==True. - added WMArrayFirst(), WMArrayLast(), WMArrayNext() and WMArrayPrevious() functions and also WM_ITERATE_ARRAY() and WM_ETARETI_ARRAY() macros, to make interfaces to WMBag and WMArray similar and to make life a little simpler when iterating through all elements of an array. - replaced bags with arrays wherever appropriate. This will improve performance a bit. - replaced some recursive code with iterative code in WINGs/selection.c - some code cleanup is src/
This commit is contained in:
@@ -1699,8 +1699,8 @@ wSelectWindow(WWindow *wwin, Bool flag)
|
||||
}
|
||||
|
||||
if (!scr->selected_windows)
|
||||
scr->selected_windows = WMCreateBag(4);
|
||||
WMPutInBag(scr->selected_windows, wwin);
|
||||
scr->selected_windows = WMCreateArray(4);
|
||||
WMAddToArray(scr->selected_windows, wwin);
|
||||
} else {
|
||||
wwin->flags.selected = 0;
|
||||
XSetWindowBorder(dpy, wwin->frame->core->window,
|
||||
@@ -1711,7 +1711,7 @@ wSelectWindow(WWindow *wwin, Bool flag)
|
||||
}
|
||||
|
||||
if (scr->selected_windows) {
|
||||
WMRemoveFromBag(scr->selected_windows, wwin);
|
||||
WMRemoveFromArray(scr->selected_windows, wwin);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user