remove unused roundUp function

also add some debugging for a problem remaining in icon placement.
This commit is contained in:
Mike Small 2020-11-27 18:18:02 -05:00
parent 1488571514
commit 08ba0745ac

View File

@ -41,6 +41,9 @@ in this Software without prior written authorization from The Open Group.
#include "parse.h"
#include "util.h"
// DEBUG ONLY
#include <iostream>
using namespace std;
using Coord = pair<int, int>;
@ -51,12 +54,6 @@ const int icon_pad = 2;
#define iconWidth(w) (BW2 + w->icon_w_width)
#define iconHeight(w) (BW2 + w->icon_w_height)
static inline int
roundUp(int v, int multiple)
{
return ((v + multiple - 1) / multiple) * multiple;
}
static Coord
PlaceIcon(const TwmWindow& win, int def_x, int def_y)
{
@ -123,6 +120,10 @@ PlaceIcon(const TwmWindow& win, int def_x, int def_y)
icon_pos.first = icon_area_x + (offset > 0 ? offset : icon_pad);
icon_pos.second = y;
}
else {
cerr << win.name << ": y == 0, using default x and y of { "
<< def_x << ", " << def_y << " }\n";
}
return icon_pos;
}