remove unused roundUp function
also add some debugging for a problem remaining in icon placement.
This commit is contained in:
parent
1488571514
commit
08ba0745ac
13
src/icons.cc
13
src/icons.cc
@ -41,6 +41,9 @@ in this Software without prior written authorization from The Open Group.
|
|||||||
#include "parse.h"
|
#include "parse.h"
|
||||||
#include "util.h"
|
#include "util.h"
|
||||||
|
|
||||||
|
// DEBUG ONLY
|
||||||
|
#include <iostream>
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
using Coord = pair<int, int>;
|
using Coord = pair<int, int>;
|
||||||
@ -51,12 +54,6 @@ const int icon_pad = 2;
|
|||||||
#define iconWidth(w) (BW2 + w->icon_w_width)
|
#define iconWidth(w) (BW2 + w->icon_w_width)
|
||||||
#define iconHeight(w) (BW2 + w->icon_w_height)
|
#define iconHeight(w) (BW2 + w->icon_w_height)
|
||||||
|
|
||||||
static inline int
|
|
||||||
roundUp(int v, int multiple)
|
|
||||||
{
|
|
||||||
return ((v + multiple - 1) / multiple) * multiple;
|
|
||||||
}
|
|
||||||
|
|
||||||
static Coord
|
static Coord
|
||||||
PlaceIcon(const TwmWindow& win, int def_x, int def_y)
|
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.first = icon_area_x + (offset > 0 ? offset : icon_pad);
|
||||||
icon_pos.second = y;
|
icon_pos.second = y;
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
cerr << win.name << ": y == 0, using default x and y of { "
|
||||||
|
<< def_x << ", " << def_y << " }\n";
|
||||||
|
}
|
||||||
return icon_pos;
|
return icon_pos;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user