]> Dogcows Code - chaz/openbox/blobdiff - openbox/popup.c
remove an old plugin call
[chaz/openbox] / openbox / popup.c
index ba1aed0b4fbdd388560fe9787f126142bdc8f62c..d44a59d162c0415d38dc80e3904b58a269d17c41 100644 (file)
@@ -42,7 +42,7 @@ Popup *popup_new(gboolean hasicon)
     self->a_bg = self->a_icon = self->a_text = NULL;
 
     attrib.override_redirect = True;
-    self->bg = XCreateWindow(ob_display, ob_root,
+    self->bg = XCreateWindow(ob_display, RootWindow(ob_display, ob_screen),
                              0, 0, 1, 1, 0, RrDepth(ob_rr_inst),
                              InputOutput, RrVisual(ob_rr_inst),
                              CWOverrideRedirect, &attrib);
@@ -109,6 +109,14 @@ void popup_size_to_string(Popup *self, gchar *text)
     self->w = textw + iconw + ob_rr_theme->bevel * (self->hasicon ? 3 : 2);
 }
 
+void popup_set_text_align(Popup *self, RrJustify align)
+{
+    if (!self->a_text)
+        self->a_text = RrAppearanceCopy(ob_rr_theme->app_hilite_label);
+
+    self->a_text->texture[0].data.text.justify = align;
+}
+
 void popup_show(Popup *self, gchar *text, ObClientIcon *icon)
 {
     gint x, y, w, h;
@@ -119,7 +127,7 @@ void popup_show(Popup *self, gchar *text, ObClientIcon *icon)
     if (!self->a_bg)
         self->a_bg = RrAppearanceCopy(ob_rr_theme->app_hilite_bg);
     if (self->hasicon && !self->a_icon)
-        self->a_icon = RrAppearanceCopy(ob_rr_theme->app_icon);
+        self->a_icon = RrAppearanceCopy(ob_rr_theme->a_clear_tex);
     if (!self->a_text)
         self->a_text = RrAppearanceCopy(ob_rr_theme->app_hilite_label);
 
This page took 0.028113 seconds and 4 git commands to generate.