fixed issue 98

git-svn-id: http://tint2.googlecode.com/svn/trunk@107 121b4492-b84c-0410-8b4c-0d4edfb3f3cc
This commit is contained in:
lorthiois@bbsoft.fr 2009-06-09 17:19:59 +00:00
parent 597d492860
commit bb130a9b5f
3 changed files with 15 additions and 18 deletions

View file

@ -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.

View file

@ -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;

View file

@ -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);