+ if (mode == OB_FOCUS_CYCLE_POPUP_MODE_ICONS) {
+ /* how many icons will fit in that row? make the width fit that */
+ w -= l + r;
+ icons_per_row = (w + HILITE_SIZE - 1) / HILITE_SIZE;
+ w = icons_per_row * HILITE_SIZE + l + r;
+
+ /* how many rows do we need? */
+ icon_rows = (p->n_targets-1) / icons_per_row + 1;
+
+ }
+ else {
+ /* in list mode, there is one column of icons.. */
+ icons_per_row = 1;
+ icon_rows = p->n_targets;
+ }
+
+ /* get the text dimensions */
+ textw = w - l - r;
+ if (mode == OB_FOCUS_CYCLE_POPUP_MODE_LIST)
+ /* leave space on the side for the icons */
+ textw -= list_mode_icon_column_w;
+ texth = RrMinHeight(p->a_text) + TEXT_BORDER * 2;
+