From d9e471575223894b535212db9050a13c4af07911 Mon Sep 17 00:00:00 2001 From: Sanel Zukan Date: Thu, 27 Oct 2011 13:15:25 +0000 Subject: [PATCH] Setup visual atom for app icons --- ede-panel/applets/system-tray/Tray.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ede-panel/applets/system-tray/Tray.cpp b/ede-panel/applets/system-tray/Tray.cpp index a9aa161..66e1632 100644 --- a/ede-panel/applets/system-tray/Tray.cpp +++ b/ede-panel/applets/system-tray/Tray.cpp @@ -90,6 +90,10 @@ void Tray::register_notification_area(void) { E_WARNING(E_STRLOC ": Unable to register notification area service\n"); return; } + + /* setup visual atom so registering icons knows how to draw images */ + Atom visual = XInternAtom(fl_display, "_NET_SYSTEM_TRAY_VISUAL", False); + XChangeProperty(fl_display, fl_message_window, visual, XA_VISUALID, 32, PropModeReplace, (unsigned char*)&fl_visual->visualid, 1); XClientMessageEvent xev; xev.type = ClientMessage; @@ -156,6 +160,8 @@ void Tray::remove_from_tray(Fl_Widget *win) { remove(win); w(w() - win->w() - TRAY_ICONS_SPACE); + E_DEBUG("Removing child, left: %i\n", children()); + distribute_children(); redraw();