gint up_arrow_y, down_arrow_y;
gboolean showing_arrows = FALSE;
gint up_arrow_y, down_arrow_y;
gboolean showing_arrows = FALSE;
/* when in list mode, there are icons down the side */
w += list_mode_icon_column_w;
w = MIN(w, MAX(screen_area->width/3, POPUP_WIDTH)); /* max width */
/* when in list mode, there are icons down the side */
w += list_mode_icon_column_w;
w = MIN(w, MAX(screen_area->width/3, POPUP_WIDTH)); /* max width */
texth = MAX(MAX(texth, RrMinHeight(p->a_text)), HILITE_SIZE);
else
texth += TEXT_BORDER * 2;
texth = MAX(MAX(texth, RrMinHeight(p->a_text)), HILITE_SIZE);
else
texth += TEXT_BORDER * 2;
/* 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;
/* 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;
/* find the height of the dialog */
h = t + b + (icon_rows * MAX(HILITE_SIZE, texth));
/* find the height of the dialog */
h = t + b + (icon_rows * MAX(HILITE_SIZE, texth));
/* in icon mode the text sits below the icons, so make some space */
h += OUTSIDE_BORDER + texth;
/* in icon mode the text sits below the icons, so make some space */
h += OUTSIDE_BORDER + texth;
const gint top = p->scroll + SCROLL_MARGIN;
const gint bottom = p->scroll + icon_rows - SCROLL_MARGIN;
const gint min_scroll = 0;
const gint top = p->scroll + SCROLL_MARGIN;
const gint bottom = p->scroll + icon_rows - SCROLL_MARGIN;
const gint min_scroll = 0;
XMapWindow(obt_display, p->list_mode_up);
showing_arrows = TRUE;
} else
XUnmapWindow(obt_display, p->list_mode_up);
if (p->scroll < p->n_targets - icon_rows &&
XMapWindow(obt_display, p->list_mode_up);
showing_arrows = TRUE;
} else
XUnmapWindow(obt_display, p->list_mode_up);
if (p->scroll < p->n_targets - icon_rows &&
+ ob_rr_theme->down_arrow_mask->height + OUTSIDE_BORDER;
/* center the icons if there is less than one row */
+ ob_rr_theme->down_arrow_mask->height + OUTSIDE_BORDER;
/* center the icons if there is less than one row */
if (!p->mapped) {
/* position the background but don't draw it */
XMoveResizeWindow(obt_display, p->bg, x, y, w, h);
if (!p->mapped) {
/* position the background but don't draw it */
XMoveResizeWindow(obt_display, p->bg, x, y, w, h);
/* position the text */
XMoveResizeWindow(obt_display, p->icon_mode_text,
icon_mode_textx, icon_mode_texty, textw, texth);
/* position the text */
XMoveResizeWindow(obt_display, p->icon_mode_text,
icon_mode_textx, icon_mode_texty, textw, texth);
RrPaint(p->a_bg, p->bg, w, h);
/* draw the scroll arrows */
RrPaint(p->a_bg, p->bg, w, h);
/* draw the scroll arrows */
p->a_arrow->texture[0].data.mask.mask =
ob_rr_theme->up_arrow_mask;
p->a_arrow->surface.parent = p->a_bg;
p->a_arrow->texture[0].data.mask.mask =
ob_rr_theme->up_arrow_mask;
p->a_arrow->surface.parent = p->a_bg;
iconx, icony, HILITE_SIZE, HILITE_SIZE);
/* position the text */
iconx, icony, HILITE_SIZE, HILITE_SIZE);
/* position the text */
XMoveResizeWindow(obt_display, target->textwin,
list_mode_textx, list_mode_texty,
textw, texth);
XMoveResizeWindow(obt_display, target->textwin,
list_mode_textx, list_mode_texty,
textw, texth);
/* show/hide the right windows */
if (row >= 0 && row < icon_rows) {
XMapWindow(obt_display, target->iconwin);
/* show/hide the right windows */
if (row >= 0 && row < icon_rows) {
XMapWindow(obt_display, target->iconwin);
XMapWindow(obt_display, target->textwin);
else
XUnmapWindow(obt_display, target->textwin);
} else {
XUnmapWindow(obt_display, target->textwin);
XMapWindow(obt_display, target->textwin);
else
XUnmapWindow(obt_display, target->textwin);
} else {
XUnmapWindow(obt_display, target->textwin);
XUnmapWindow(obt_display, target->iconwin);
else
XMapWindow(obt_display, target->iconwin);
XUnmapWindow(obt_display, target->iconwin);
else
XMapWindow(obt_display, target->iconwin);
RrPaint(p->a_icon, target->iconwin, HILITE_SIZE, HILITE_SIZE);
/* draw the text */
RrPaint(p->a_icon, target->iconwin, HILITE_SIZE, HILITE_SIZE);
/* draw the text */
target == newtarget)
{
text = (target == newtarget) ? p->a_hilite_text : p->a_text;
text->texture[0].data.text.string = target->text;
text->surface.parentx =
target == newtarget)
{
text = (target == newtarget) ? p->a_hilite_text : p->a_text;
text->texture[0].data.text.string = target->text;
text->surface.parentx =