From 08ba0745acfa4c08845957ecba79196c97a5e0bd Mon Sep 17 00:00:00 2001 From: Mike Small Date: Fri, 27 Nov 2020 18:18:02 -0500 Subject: [PATCH] remove unused roundUp function also add some debugging for a problem remaining in icon placement. --- src/icons.cc | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/icons.cc b/src/icons.cc index d05c225..032e200 100644 --- a/src/icons.cc +++ b/src/icons.cc @@ -41,6 +41,9 @@ in this Software without prior written authorization from The Open Group. #include "parse.h" #include "util.h" +// DEBUG ONLY +#include + using namespace std; using Coord = pair; @@ -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; }