summaryrefslogtreecommitdiff
path: root/openbox
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2008-02-05 00:11:38 -0500
committerDana Jansens <danakj@orodu.net>2008-02-05 00:11:59 -0500
commit0369732c35b42b272eb66da4a54b37f253037049 (patch)
tree364863b081ccf6c77add2d1119d0e0c5a765ca06 /openbox
parentb097f84dfdf4e2548dba96aa63325cb05b5244a1 (diff)
when scrolling, all the items need to be redrawn to make parentrelative work
Diffstat (limited to 'openbox')
-rw-r--r--openbox/focus_cycle_popup.c82
1 files changed, 36 insertions, 46 deletions
diff --git a/openbox/focus_cycle_popup.c b/openbox/focus_cycle_popup.c
index c5807c3a..e418d96f 100644
--- a/openbox/focus_cycle_popup.c
+++ b/openbox/focus_cycle_popup.c
@@ -513,53 +513,43 @@ static void popup_render(ObFocusCyclePopup *p, const ObClient *c)
XMapWindow(obt_display, target->iconwin);
}
- /* only draw if we have to */
- if (!p->mapped ||
- newtarget == target || p->last_target == target ||
- /* wasn't visible before... */
- ((row + p->scroll < last_scroll ||
- row + p->scroll >= last_scroll + icon_rows) &&
- /* ...and is visible now */
- (row >= 0 && row < icon_rows)))
+ /* get the icon from the client */
+ icon = client_icon(target->client, ICON_SIZE, ICON_SIZE);
+ p->a_icon->texture[0].data.rgba.width = icon->width;
+ p->a_icon->texture[0].data.rgba.height = icon->height;
+ p->a_icon->texture[0].data.rgba.twidth = ICON_SIZE;
+ p->a_icon->texture[0].data.rgba.theight = ICON_SIZE;
+ p->a_icon->texture[0].data.rgba.tx = HILITE_OFFSET;
+ p->a_icon->texture[0].data.rgba.ty = HILITE_OFFSET;
+ p->a_icon->texture[0].data.rgba.alpha =
+ target->client->iconic ? OB_ICONIC_ALPHA : 0xff;
+ p->a_icon->texture[0].data.rgba.data = icon->data;
+
+ /* Draw the hilite? */
+ p->a_icon->texture[1].type = (target == newtarget) ?
+ RR_TEXTURE_RGBA : RR_TEXTURE_NONE;
+
+ /* draw the icon */
+ p->a_icon->surface.parentx = iconx;
+ p->a_icon->surface.parenty = icony;
+ RrPaint(p->a_icon, target->iconwin, HILITE_SIZE, HILITE_SIZE);
+
+ /* draw the text */
+ if (p->mode == OB_FOCUS_CYCLE_POPUP_MODE_LIST ||
+ target == newtarget)
{
- /* get the icon from the client */
- icon = client_icon(target->client, ICON_SIZE, ICON_SIZE);
- p->a_icon->texture[0].data.rgba.width = icon->width;
- p->a_icon->texture[0].data.rgba.height = icon->height;
- p->a_icon->texture[0].data.rgba.twidth = ICON_SIZE;
- p->a_icon->texture[0].data.rgba.theight = ICON_SIZE;
- p->a_icon->texture[0].data.rgba.tx = HILITE_OFFSET;
- p->a_icon->texture[0].data.rgba.ty = HILITE_OFFSET;
- p->a_icon->texture[0].data.rgba.alpha =
- target->client->iconic ? OB_ICONIC_ALPHA : 0xff;
- p->a_icon->texture[0].data.rgba.data = icon->data;
-
- /* Draw the hilite? */
- p->a_icon->texture[1].type = (target == newtarget) ?
- RR_TEXTURE_RGBA : RR_TEXTURE_NONE;
-
- /* draw the icon */
- p->a_icon->surface.parentx = iconx;
- p->a_icon->surface.parenty = icony;
- RrPaint(p->a_icon, target->iconwin, HILITE_SIZE, HILITE_SIZE);
-
- /* draw the text */
- if (p->mode == OB_FOCUS_CYCLE_POPUP_MODE_LIST ||
- target == newtarget)
- {
- text = (target == newtarget) ? p->a_hilite_text : p->a_text;
- text->texture[0].data.text.string = target->text;
- text->surface.parentx =
- p->mode == OB_FOCUS_CYCLE_POPUP_MODE_ICONS ?
- icon_mode_textx : list_mode_textx;
- text->surface.parenty =
- p->mode == OB_FOCUS_CYCLE_POPUP_MODE_ICONS ?
- icon_mode_texty : list_mode_texty;
- RrPaint(text,
- (p->mode == OB_FOCUS_CYCLE_POPUP_MODE_ICONS ?
- p->icon_mode_text : target->textwin),
- textw, texth);
- }
+ text = (target == newtarget) ? p->a_hilite_text : p->a_text;
+ text->texture[0].data.text.string = target->text;
+ text->surface.parentx =
+ p->mode == OB_FOCUS_CYCLE_POPUP_MODE_ICONS ?
+ icon_mode_textx : list_mode_textx;
+ text->surface.parenty =
+ p->mode == OB_FOCUS_CYCLE_POPUP_MODE_ICONS ?
+ icon_mode_texty : list_mode_texty;
+ RrPaint(text,
+ (p->mode == OB_FOCUS_CYCLE_POPUP_MODE_ICONS ?
+ p->icon_mode_text : target->textwin),
+ textw, texth);
}
}
}