From 6fd1e28f4409c6f14ff8046830f2910afaa01385 Mon Sep 17 00:00:00 2001 From: Thierry Lorthiois Date: Tue, 9 Jun 2009 17:19:59 +0000 Subject: [PATCH] fixed issue 98 --- ChangeLog | 6 +++++- src/clock/clock.c | 14 +++++++------- src/tint.c | 13 +++---------- 3 files changed, 15 insertions(+), 18 deletions(-) diff --git a/ChangeLog b/ChangeLog index c461292..cc425af 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,6 @@ +2009-06-09 +- fixed issue 98 + 2009-06-08 - fixed issue 97 and issue 95 @@ -17,7 +20,8 @@ 2009-06-06 - fixed issue 90 and issue 81 : window manager's menu in panel padding - works on openbox and pekwm. doesn't work on xfce, windowmaker ? + works on openbox, pekwm, fluxbox, icewm. + doesn't work on xfce, windowmaker ? tint2 send mouse event to your window manager on left/right padding and on top/bottom panel padding. diff --git a/src/clock/clock.c b/src/clock/clock.c index 7bb67a7..01b1991 100644 --- a/src/clock/clock.c +++ b/src/clock/clock.c @@ -60,6 +60,13 @@ void init_clock() Clock *clock; int i, time_height, time_height_ink, date_height, date_height_ink; + init_precision(); + // update clock to force update (-time_precision) + struct timeval stv; + gettimeofday(&stv, 0); + time_clock.tv_sec = stv.tv_sec - time_precision; + time_clock.tv_sec -= time_clock.tv_sec % time_precision; + for (i=0 ; i < nb_panel ; i++) { panel = &panel1[i]; clock = &panel->clock; @@ -68,13 +75,6 @@ void init_clock() clock->area.panel = panel; clock->area._draw_foreground = draw_clock; clock->area._resize = resize_clock; - init_precision(); - - // update clock to force update (-time_precision) - struct timeval stv; - gettimeofday(&stv, 0); - time_clock.tv_sec = stv.tv_sec - time_precision; - time_clock.tv_sec -= time_clock.tv_sec % time_precision; if (!clock->area.on_screen) continue; diff --git a/src/tint.c b/src/tint.c index 96ac0a0..6544219 100644 --- a/src/tint.c +++ b/src/tint.c @@ -302,13 +302,11 @@ void event_property_notify (XEvent *e) } // Window list else if (at == server.atom._NET_CLIENT_LIST) { - //printf("Window list\n"); task_refresh_tasklist(); panel_refresh = 1; } // Change active else if (at == server.atom._NET_ACTIVE_WINDOW) { - //printf("Change active\n"); GSList *l0; if (task_active) { for (i=0 ; i < nb_panel ; i++) { @@ -507,6 +505,9 @@ void event_timer() if (gettimeofday(&stv, 0)) return; if (abs(stv.tv_sec - time_clock.tv_sec) < time_precision) return; + time_clock.tv_sec = stv.tv_sec; + time_clock.tv_sec -= time_clock.tv_sec % time_precision; +printf("event_timer %d\n", time_precision); // urgent task if (task_urgent) { @@ -523,8 +524,6 @@ void event_timer() // update clock if (time1_format) { - time_clock.tv_sec = stv.tv_sec; - time_clock.tv_sec -= time_clock.tv_sec % time_precision; for (i=0 ; i < nb_panel ; i++) panel1[i].clock.area.resize = 1; } @@ -648,10 +647,4 @@ load_config: } } -// **************************************************** -// main_win doesn't include panel.area.paddingx, so we have WM capabilities on left and right. -// this feature is disabled ! -//XCopyArea (server.dsp, server.pmap, p->main_win, server.gc, p->area.paddingxlr, 0, p->area.width-(2*p->area.paddingxlr), p->area.height, 0, 0); -//XCopyArea (server.dsp, panel.area.pix.pmap, server.root_win, server.gc_root, 0, 0, panel.area.width, panel.area.height, server.posx, server.posy); -//XCopyArea (server.dsp, server.pmap, panel.main_win, server.gc, panel.area.paddingxlr, 0, panel.area.width-(2*panel.area.paddingxlr), panel.area.height, 0, 0); -- 2.45.2