> After some reviews on this dev list here is a final version of the
> advanced switching windows system.
I tested the patch now and I liked this new functionality.
Good job Samir.
It increases the wmaker binary a bit, of course
text data bss dec hex filename
599924 19160 8544 627628 993ac wmaker.new
598740 19160 8544 626444 98f0c wmaker.old
but that is fine, imho.
But I want to say that the patch still needs some minor
cleanups.
It introduces 21 whitespace errors,
[EMAIL PROTECTED]:wmaker.git]$ git apply advanced_swp.patch
advanced_swp.patch:26: trailing whitespace.
swkill.png
advanced_swp.patch:108: trailing whitespace.
WMAddToArray(windowsToClose, newFocused);
advanced_swp.patch:109: trailing whitespace.
closingEvent = ev;//>>>>>>>:( ugly I know
advanced_swp.patch:131: trailing whitespace.
advanced_swp.patch:146: trailing whitespace.
warning: squelched 16 whitespace errors
warning: 21 lines add whitespace errors.
which I think should be fixed.
And reviewing the patch some more, I noticed that there are
two unneeded casts in this part
+void wSwitchPanelRefreshImages(WSwitchPanel *panel, WWindow *focus){
+ WWindow *wwin;
+ int i;
+ //if it is faster to check application than rendering all windows
+ Window *win = (Window*)wApplicationOf(focus->main_window);
+ WM_ITERATE_ARRAY(panel->windows, wwin, i) {
+ if (win == (Window*)wApplicationOf(wwin->main_window))
+ changeImage(panel, i, 0);
so one could make it simpler by defining 'win' to have the same
type as wApplicationOf(). Something like the below
diff --git a/src/switchpanel.c b/src/switchpanel.c
index a0de894..a335dfc 100644
--- a/src/switchpanel.c
+++ b/src/switchpanel.c
@@ -648,12 +648,14 @@ void wSwitchPanelDestroy(WSwitchPanel *panel)
void wSwitchPanelRefreshImages(WSwitchPanel *panel, WWindow *focus){
+
+ WApplication *win = wApplicationOf(focus->main_window);
WWindow *wwin;
int i;
+
//if it is faster to check application than rendering all windows
- Window *win = (Window*)wApplicationOf(focus->main_window);
WM_ITERATE_ARRAY(panel->windows, wwin, i) {
- if (win == (Window*)wApplicationOf(wwin->main_window))
+ if (win == wApplicationOf(wwin->main_window))
changeImage(panel, i, 0);
}
Other than these little details, the patch is fine and I will use
it here.
--
To unsubscribe, send mail to [EMAIL PROTECTED]