From: Christophe CURIS <christophe.cu...@free.fr>

In the function wHandleAppIconMove there is an event handling loop
which was supposed to be finished with the variable 'done'.

As the code is using 'return' inside the loop, which is both more
convenient and easier to read, this variable was never set, making
the loop an infinite looking loop.

This patch removes the variable so it will be clear how it behaves.

Signed-off-by: Christophe CURIS <christophe.cu...@free.fr>
---
 src/appicon.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/src/appicon.c b/src/appicon.c
index 43a0f32..a82ba0a 100644
--- a/src/appicon.c
+++ b/src/appicon.c
@@ -747,7 +747,7 @@ Bool wHandleAppIconMove(WAppIcon *aicon, XEvent *event)
        WDock *lastDock = originalDock;
        WDock *allDocks[scr->drawer_count + 2]; /* clip, dock and drawers 
(order determined at runtime) */
        WDrawerChain *dc;
-       Bool done = False, dockable, ondock;
+       Bool dockable, ondock;
        Bool grabbed = False;
        Bool collapsed = False; /* Stores the collapsed state of lastDock, 
before the moving appicon entered it */
        int superfluous = wPreferences.superfluous; /* we cache it to avoid 
problems */
@@ -837,7 +837,7 @@ Bool wHandleAppIconMove(WAppIcon *aicon, XEvent *event)
        if (ondock)
                XMapWindow(dpy, scr->dock_shadow);
 
-       while (!done) {
+       while (1) {
                WMMaskEvent(dpy, PointerMotionMask | ButtonReleaseMask | 
ButtonPressMask
                            | ButtonMotionMask | ExposureMask | 
EnterWindowMask, &ev);
                switch (ev.type) {
@@ -1087,7 +1087,6 @@ Bool wHandleAppIconMove(WAppIcon *aicon, XEvent *event)
                        return hasMoved;
                }
        }
-       return False; /* Never reached */
 }
 
 /* This function save the application icon and store the path in the 
Dictionary */
-- 
2.0.0


-- 
To unsubscribe, send mail to wmaker-dev-unsubscr...@lists.windowmaker.org.

Reply via email to