1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-22 22:28:02 +01:00

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 <christophe.curis@free.fr>
This commit is contained in:
Christophe CURIS
2014-07-04 23:28:40 +02:00
committed by Carlos R. Mafra
parent 1bac0c9dcb
commit 30c8c1c645

View File

@@ -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 */