]> Dogcows Code - chaz/tint2/blobdiff - src/tint.c
fixed decorated window with compiz
[chaz/tint2] / src / tint.c
index 46c0c22dd46bd00d79e905ff99d87aa8c36b6095..8bf2127c22c714e94d1aebc63565b3e5f8763459 100644 (file)
@@ -63,11 +63,7 @@ void init ()
    panel.clock.area.draw_foreground = draw_foreground_clock;
    g_task.area.draw_foreground = draw_foreground_task;
    window.main_win = 0;
-   
-   // append full transparency background
-   //Area *back = calloc(1, sizeof(Area));
-   list_back = g_slist_append(0, calloc(1, sizeof(Area)));
-   
+      
    server.dsp = XOpenDisplay (NULL);
    if (!server.dsp) {
       fprintf(stderr, "Could not open display.\n");
@@ -288,9 +284,11 @@ void event_property_notify (Window win, Atom at)
       }
       /* Window icon changed */
       else if (at == server.atom._NET_WM_ICON) {
-         if (tsk->icon_data != 0) XFree (tsk->icon_data);
+         if (tsk->icon_data) {
+            free (tsk->icon_data);
+            tsk->icon_data = 0;
+         }
          tsk->area.redraw = 1;
-         tsk->icon_data = 0;
          panel.refresh = 1;
       }
       /* Window desktop changed */
@@ -353,6 +351,9 @@ int main (int argc, char *argv[])
 load_config:
    if (panel.area.pmap) XFreePixmap (server.dsp, panel.area.pmap);
    panel.area.pmap = 0;                           
+   // append full transparency background
+   list_back = g_slist_append(0, calloc(1, sizeof(Area)));
+
    // read tint2rc config
    i = 0;
    if (c != -1)
@@ -368,8 +369,8 @@ load_config:
    
    window_draw_panel ();
    
-   // BUG: draw(clock) is needed here, but 'on the paper' it's not necessary.
-   draw(&panel.clock.area);
+   // BUG: refresh(clock) is needed here, but 'on the paper' it's not necessary.
+   refresh(&panel.clock.area);
 
    x11_fd = ConnectionNumber (server.dsp);
    XSync (server.dsp, False);
This page took 0.02116 seconds and 4 git commands to generate.