From 30c8c1c6459d5a6403ce3921df4c96d76f23327b Mon Sep 17 00:00:00 2001 From: Christophe CURIS Date: Fri, 4 Jul 2014 23:28:40 +0200 Subject: [PATCH] wmaker: removed variable whose value never changed 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 --- src/appicon.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/appicon.c b/src/appicon.c index 43a0f32a..a82ba0ae 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 */