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

clean wDockFindFreeSlot function

it appears that a sx var is set but not used
This commit is contained in:
David Maciejak
2014-05-13 18:53:41 +08:00
committed by Carlos R. Mafra
parent 0c151a55f4
commit 7783c2258b

View File

@@ -2719,7 +2719,7 @@ Bool wDockFindFreeSlot(WDock *dock, int *x_pos, int *y_pos)
int x, y; int x, y;
int i, done = False; int i, done = False;
int corner; int corner;
int sx = 0, ex = scr->scr_width, ey = scr->scr_height; int ex = scr->scr_width, ey = scr->scr_height;
int extra_count = 0; int extra_count = 0;
if (dock->type == WM_DRAWER) { if (dock->type == WM_DRAWER) {
@@ -2738,17 +2738,12 @@ Bool wDockFindFreeSlot(WDock *dock, int *x_pos, int *y_pos)
if (dock->icon_count + extra_count >= dock->max_icons) if (dock->icon_count + extra_count >= dock->max_icons)
return False; return False;
if (!wPreferences.flags.nodock && scr->dock) { if (!wPreferences.flags.nodock && scr->dock && scr->dock->on_right_side) {
if (scr->dock->on_right_side) ex -= ICON_SIZE + DOCK_EXTRA_SPACE;
ex -= ICON_SIZE + DOCK_EXTRA_SPACE;
else
sx += ICON_SIZE + DOCK_EXTRA_SPACE;
} }
if (ex < dock->x_pos) if (ex < dock->x_pos)
ex = dock->x_pos; ex = dock->x_pos;
if (sx > dock->x_pos + ICON_SIZE)
sx = dock->x_pos + ICON_SIZE;
#define C_NONE 0 #define C_NONE 0
#define C_NW 1 #define C_NW 1
#define C_NE 2 #define C_NE 2