self->a_text = RrAppearanceCopy(ob_rr_theme->osd_hilite_label);
self->iconwm = self->iconhm = 1;
attrib.override_redirect = True;
self->a_text = RrAppearanceCopy(ob_rr_theme->osd_hilite_label);
self->iconwm = self->iconhm = 1;
attrib.override_redirect = True;
- self->bg = XCreateWindow(obt_display, RootWindow(obt_display, ob_screen),
+ self->bg = XCreateWindow(obt_display, obt_root(ob_screen),
0, 0, 1, 1, 0, RrDepth(ob_rr_inst),
InputOutput, RrVisual(ob_rr_inst),
CWOverrideRedirect, &attrib);
0, 0, 1, 1, 0, RrDepth(ob_rr_inst),
InputOutput, RrVisual(ob_rr_inst),
CWOverrideRedirect, &attrib);
XMapWindow(obt_display, self->text);
stacking_add(INTERNAL_AS_WINDOW(self));
XMapWindow(obt_display, self->text);
stacking_add(INTERNAL_AS_WINDOW(self));
XDestroyWindow(obt_display, self->bg);
XDestroyWindow(obt_display, self->text);
RrAppearanceFree(self->a_bg);
RrAppearanceFree(self->a_text);
XDestroyWindow(obt_display, self->bg);
XDestroyWindow(obt_display, self->text);
RrAppearanceFree(self->a_bg);
RrAppearanceFree(self->a_text);
gint emptyx, emptyy; /* empty space between elements */
gint textx, texty, textw, texth;
gint iconx, icony, iconw, iconh;
gint emptyx, emptyy; /* empty space between elements */
gint textx, texty, textw, texth;
gint iconx, icony, iconw, iconh;
/* when there is no icon and the text is not parent relative, then
fill the whole dialog with the text appearance, don't use the bg at all
*/
/* when there is no icon and the text is not parent relative, then
fill the whole dialog with the text appearance, don't use the bg at all
*/
RrMargins(self->a_bg, &l, &t, &r, &b);
else
l = t = r = b = 0;
RrMargins(self->a_bg, &l, &t, &r, &b);
else
l = t = r = b = 0;
iconw = texth * self->iconwm;
iconh = texth * self->iconhm;
textx += iconw + ob_rr_theme->paddingx;
if (textw)
emptyx += ob_rr_theme->paddingx; /* between the icon and text */
iconw = texth * self->iconwm;
iconh = texth * self->iconhm;
textx += iconw + ob_rr_theme->paddingx;
if (textw)
emptyx += ob_rr_theme->paddingx; /* between the icon and text */
/* when there is no icon and the text is not parent relative, then
fill the whole dialog with the text appearance, don't use the bg at all
*/
/* when there is no icon and the text is not parent relative, then
fill the whole dialog with the text appearance, don't use the bg at all
*/
RrPaint(self->a_bg, self->bg, w, h);
if (textw) {
RrPaint(self->a_bg, self->bg, w, h);
if (textw) {
RrPaint(self->a_text, self->text, textw, texth);
}
RrPaint(self->a_text, self->text, textw, texth);
}
self->draw_icon(iconx, icony, iconw, iconh, self->draw_icon_data);
/* do the actual showing */
if (!self->mapped) {
self->draw_icon(iconx, icony, iconw, iconh, self->draw_icon_data);
/* do the actual showing */
if (!self->mapped) {
- obt_main_loop_timeout_add(ob_main_loop, usec,
- popup_show_timeout, self,
- g_direct_equal, NULL);
+ self->delay_timer =
+ g_timeout_add(msec, popup_show_timeout, self);
self->popup = popup_new();
self->a_icon = RrAppearanceCopy(ob_rr_theme->a_clear_tex);
self->icon = XCreateWindow(obt_display, self->popup->bg,
self->popup = popup_new();
self->a_icon = RrAppearanceCopy(ob_rr_theme->a_clear_tex);
self->icon = XCreateWindow(obt_display, self->popup->bg,
XDestroyWindow(obt_display, self->icon);
RrAppearanceFree(self->a_icon);
popup_free(self->popup);
XDestroyWindow(obt_display, self->icon);
RrAppearanceFree(self->a_icon);
popup_free(self->popup);
-void icon_popup_delay_show(ObIconPopup *self, gulong usec,
- gchar *text, const ObClientIcon *icon)
+void icon_popup_delay_show(ObIconPopup *self, gulong msec,
+ gchar *text, RrImage *icon)
- self->a_icon->texture[0].type = RR_TEXTURE_RGBA;
- self->a_icon->texture[0].data.rgba.width = icon->width;
- self->a_icon->texture[0].data.rgba.height = icon->height;
- self->a_icon->texture[0].data.rgba.alpha = 0xff;
- self->a_icon->texture[0].data.rgba.data = icon->data;
- } else
+ RrAppearanceClearTextures(self->a_icon);
+ self->a_icon->texture[0].type = RR_TEXTURE_IMAGE;
+ self->a_icon->texture[0].data.image.alpha = 0xff;
+ self->a_icon->texture[0].data.image.image = icon;
+ } else {
+ RrAppearanceClearTextures(self->a_icon);
self->popup = popup_new();
self->desks = 0;
self->wins = g_new(Window, self->desks);
self->popup = popup_new();
self->desks = 0;
self->wins = g_new(Window, self->desks);
- self->hilight = RrAppearanceCopy(ob_rr_theme->osd_hilite_fg);
- self->unhilight = RrAppearanceCopy(ob_rr_theme->osd_unhilite_fg);
+ self->hilight = RrAppearanceCopy(ob_rr_theme->osd_hilite_bg);
+ self->unhilight = RrAppearanceCopy(ob_rr_theme->osd_unhilite_bg);