mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-22 14:08:06 +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:
committed by
Carlos R. Mafra
parent
1bac0c9dcb
commit
30c8c1c645
@@ -747,7 +747,7 @@ Bool wHandleAppIconMove(WAppIcon *aicon, XEvent *event)
|
|||||||
WDock *lastDock = originalDock;
|
WDock *lastDock = originalDock;
|
||||||
WDock *allDocks[scr->drawer_count + 2]; /* clip, dock and drawers (order determined at runtime) */
|
WDock *allDocks[scr->drawer_count + 2]; /* clip, dock and drawers (order determined at runtime) */
|
||||||
WDrawerChain *dc;
|
WDrawerChain *dc;
|
||||||
Bool done = False, dockable, ondock;
|
Bool dockable, ondock;
|
||||||
Bool grabbed = False;
|
Bool grabbed = False;
|
||||||
Bool collapsed = False; /* Stores the collapsed state of lastDock, before the moving appicon entered it */
|
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 */
|
int superfluous = wPreferences.superfluous; /* we cache it to avoid problems */
|
||||||
@@ -837,7 +837,7 @@ Bool wHandleAppIconMove(WAppIcon *aicon, XEvent *event)
|
|||||||
if (ondock)
|
if (ondock)
|
||||||
XMapWindow(dpy, scr->dock_shadow);
|
XMapWindow(dpy, scr->dock_shadow);
|
||||||
|
|
||||||
while (!done) {
|
while (1) {
|
||||||
WMMaskEvent(dpy, PointerMotionMask | ButtonReleaseMask | ButtonPressMask
|
WMMaskEvent(dpy, PointerMotionMask | ButtonReleaseMask | ButtonPressMask
|
||||||
| ButtonMotionMask | ExposureMask | EnterWindowMask, &ev);
|
| ButtonMotionMask | ExposureMask | EnterWindowMask, &ev);
|
||||||
switch (ev.type) {
|
switch (ev.type) {
|
||||||
@@ -1087,7 +1087,6 @@ Bool wHandleAppIconMove(WAppIcon *aicon, XEvent *event)
|
|||||||
return hasMoved;
|
return hasMoved;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return False; /* Never reached */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* This function save the application icon and store the path in the Dictionary */
|
/* This function save the application icon and store the path in the Dictionary */
|
||||||
|
|||||||
Reference in New Issue
Block a user