X-Git-Url: https://git.brokenzipper.com/gitweb?a=blobdiff_plain;f=src%2Fpanel.c;h=3151be234ed688d363fb51b43d9a88c0f5b7fc11;hb=f704f3350599d7f71afd0fb827c0948dec67ede3;hp=9ac62f2d8fafb699fb7acac01c2b05eea4032581;hpb=fbf80ddaba618c12fc0cf2cd62bc9f4ec8b766c6;p=chaz%2Ftint2 diff --git a/src/panel.c b/src/panel.c index 9ac62f2..3151be2 100644 --- a/src/panel.c +++ b/src/panel.c @@ -71,6 +71,13 @@ void init_panel() int i, old_nb_panel; Panel *new_panel, *p; + init_tooltip(); + init_systray(); + init_clock(); +#ifdef ENABLE_BATTERY + init_battery(); +#endif + cleanup_taskbar(); for (i=0 ; i < nb_panel ; i++) { free_area(&panel1[i].area); @@ -123,7 +130,7 @@ void init_panel() init_panel_size_and_position(p); // add childs - if (p->clock.area.on_screen) { + if (clock_enabled) { init_clock_panel(p); p->area.list = g_slist_append(p->area.list, &p->clock); } @@ -146,7 +153,6 @@ void init_panel() if (g_tooltip.enabled) event_mask |= PointerMotionMask|LeaveWindowMask; XSetWindowAttributes att = { ParentRelative, 0L, 0, 0L, 0, 0, Always, 0L, 0L, False, event_mask, NoEventMask, False, 0, 0 }; - if (p->main_win) XDestroyWindow(server.dsp, p->main_win); p->main_win = XCreateWindow(server.dsp, server.root_win, p->posx, p->posy, p->area.width, p->area.height, 0, server.depth, InputOutput, CopyFromParent, CWEventMask, &att); } else { @@ -236,12 +242,6 @@ void cleanup_panel() task_urgent = 0; cleanup_taskbar(); - // font allocated once - if (panel1[0].g_task.font_desc) { - pango_font_description_free(panel1[0].g_task.font_desc); - panel1[0].g_task.font_desc = 0; - } - int i; Panel *p; for (i=0 ; i < nb_panel ; i++) {