]> Dogcows Code - chaz/tint2/blobdiff - src/systray/systraybar.c
fixed Issue 282
[chaz/tint2] / src / systray / systraybar.c
index 10344b7792a8c80fc19638094a4f9b5481ccefff..a6fec3ae56c24d9de722c69f157db26851e19c55 100644 (file)
@@ -61,11 +61,13 @@ void default_systray()
        systray.alpha = 100;
        systray.sort = 3;
        systray.area._draw_foreground = draw_systray;
+       systray.area.size_mode = SIZE_BY_CONTENT;
        systray.area._resize = resize_systray;
 }
 
 void cleanup_systray()
 {
+       stop_net();
        systray_enabled = 0;
        systray_max_icon_size = 0;
        systray.area.on_screen = 0;
@@ -372,6 +374,7 @@ gboolean add_icon(Window id)
        if ( XGetWindowAttributes(server.dsp, id, &attr) == False ) return FALSE;
        unsigned long mask = 0;
        XSetWindowAttributes set_attr;
+       //printf("icon with depth: %d, width %d, height %d\n", attr.depth, attr.width, attr.height);
        printf("icon with depth: %d\n", attr.depth);
        if (attr.depth != server.depth || systray.alpha != 100 || systray.brightness != 0 || systray.saturation != 0) {
                set_attr.colormap = attr.colormap;
@@ -434,7 +437,6 @@ gboolean add_icon(Window id)
                XSendEvent(server.dsp, id, False, 0xFFFFFF, &e);
        }
 
-       printf("Adding systray with window: %d\n", id);
        traywin = g_new0(TrayWindow, 1);
        traywin->id = parent_window;
        traywin->tray_id = id;
@@ -475,7 +477,6 @@ void remove_icon(TrayWindow *traywin)
 {
        XErrorHandler old;
 
-       printf("Removing systray with window: %d\n", traywin->tray_id);
        // remove from our list
        systray.list_icons = g_slist_remove(systray.list_icons, traywin);
        systray.area.resize = 1;
@@ -575,6 +576,8 @@ void systray_render_icon_now(void* t)
                return;
 
        imlib_context_set_image(image);
+       //if (traywin->depth == 24)
+               //imlib_save_image("/home/thil77/test.jpg");
        imlib_image_set_has_alpha(1);
        DATA32* data = imlib_image_get_data();
        if (traywin->depth == 24) {
This page took 0.020403 seconds and 4 git commands to generate.