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

Some cleanup in the dock.c code.

This commit is contained in:
dan
1999-04-22 03:33:54 +00:00
parent dfbc246a3f
commit a997825148

View File

@@ -2383,7 +2383,7 @@ wDockSnapIcon(WDock *dock, WAppIcon *icon, int req_x, int req_y,
if (ex_y>=0 && ex_y<=max_y_icons && (aicon==icon || !aicon)) { if (ex_y>=0 && ex_y<=max_y_icons && (aicon==icon || !aicon)) {
*ret_x = 0; *ret_x = 0;
*ret_y = ex_y; *ret_y = ex_y;
return True; return True;
} }
@@ -2420,16 +2420,16 @@ wDockSnapIcon(WDock *dock, WAppIcon *icon, int req_x, int req_y,
|| ||
(ex_y < closest && closest - ex_y <= DOCK_DETTACH_THRESHOLD+1))) { (ex_y < closest && closest - ex_y <= DOCK_DETTACH_THRESHOLD+1))) {
*ret_x = 0; *ret_x = 0;
*ret_y = closest; *ret_y = closest;
return True; return True;
} }
} else { /* !redocking */ } else { /* !redocking */
/* if slot is free and the icon is close enough, return it */ /* if slot is free and the icon is close enough, return it */
if (!aicon && ex_x == 0 && ex_y >= 0 && ex_y <= max_y_icons) { if (!aicon && ex_x == 0 && ex_y >= 0 && ex_y <= max_y_icons) {
*ret_x = 0; *ret_x = 0;
*ret_y = ex_y; *ret_y = ex_y;
return True; return True;
} }
} }
} else { /* CLIP */ } else { /* CLIP */
@@ -3645,25 +3645,11 @@ handleIconMove(WDock *dock, WAppIcon *aicon, XEvent *event)
if (!ondock) { if (!ondock) {
XMapWindow(dpy, scr->dock_shadow); XMapWindow(dpy, scr->dock_shadow);
#if 0
if (!collapsed && (collapsed = last_dock->collapsed)) {
last_dock->collapsed = 0;
wDockShowIcons(last_dock);
}
#endif
} }
ondock = 1; ondock = 1;
} else { } else {
if (ondock) { if (ondock) {
XUnmapWindow(dpy, scr->dock_shadow); XUnmapWindow(dpy, scr->dock_shadow);
#if 0
if (last_dock && collapsed &&
aicon->running && (ev.xmotion.state & MOD_MASK)) {
last_dock->collapsed = 1;
wDockHideIcons(last_dock);
collapsed = 0;
}
#endif
} }
ondock = 0; ondock = 0;
} }