1 --- clean/matchbox-panel-0.9.2/src/msg.c 2005-03-20 17:43:32.000000000 +0000
2 +++ matchbox-panel-0.9.2/src/msg.c 2006-01-12 20:35:29.151432064 +0000
3 @@ -604,21 +604,38 @@ msg_handle_events(MBPanel *panel, XEvent
8 -msg_handle_timeouts(MBPanel *d)
10 +msg_set_timeout(MBPanel *d, struct timeval *tv, struct timeval **tvp)
14 if (d->msg_timeout) /* NON ZERO */
16 - if ((d->msg_starttime+d->msg_timeout) < _get_server_time(d))
17 + int timeleft, sec, usec;
19 + timeleft = d->msg_timeout - (_get_server_time (d) - d->msg_starttime);
22 - XDestroyWindow(d->dpy, d->msg_win);
25 + XDestroyWindow(d->dpy, d->msg_win);
30 + sec = timeleft / 1000;
31 + usec = (timeleft % 1000) * 1000;
33 + if (!*tvp || tv->tv_sec > sec || (tv->tv_sec == sec && tv->tv_usec > usec))
48 diff -upr clean/matchbox-panel-0.9.2/src/msg.h matchbox-panel-0.9.2/src/msg.h
49 --- clean/matchbox-panel-0.9.2/src/msg.h 2005-03-20 17:43:32.000000000 +0000
50 +++ matchbox-panel-0.9.2/src/msg.h 2006-01-12 20:30:40.843261568 +0000
51 @@ -15,6 +15,6 @@ MBPanelMessageQueue* msg_new(MBPanel *do
52 void msg_destroy(MBPanel *d, MBPanelMessageQueue *m);
53 void msg_add_data(MBPanel *d, XClientMessageEvent *e);
54 void msg_handle_events(MBPanel *d, XEvent *e);
55 -void msg_handle_timeouts(MBPanel *d);
56 +Bool msg_set_timeout(MBPanel *d, struct timeval *tv, struct timeval **tvp);
59 diff -upr clean/matchbox-panel-0.9.2/src/panel.c matchbox-panel-0.9.2/src/panel.c
60 --- clean/matchbox-panel-0.9.2/src/panel.c 2005-04-06 21:11:52.000000000 +0100
61 +++ matchbox-panel-0.9.2/src/panel.c 2006-01-12 20:33:13.282087344 +0000
62 @@ -1023,11 +1023,12 @@ panel_main(MBPanel *panel)
69 + struct timeval tvt, *tvp = NULL;
71 + session_preexisting_set_timeout (panel, &tvt, &tvp);
72 + msg_set_timeout (panel, &tvt, &tvp);
74 - if (get_xevent_timed(panel->dpy, &an_event, &tvt))
75 + if (get_xevent_timed(panel->dpy, &an_event, tvp))
78 if (panel->xsettings_client != NULL)
79 @@ -1225,8 +1226,6 @@ panel_main(MBPanel *panel)
81 msg_handle_events(panel, &an_event);
83 - session_preexisting_handle_timeouts(panel);
84 - msg_handle_timeouts(panel);
88 Only in matchbox-panel-0.9.2/src: panel.c~
89 Only in matchbox-panel-0.9.2/src: panel_menu.o
90 Only in matchbox-panel-0.9.2/src: panel.o
91 Only in matchbox-panel-0.9.2/src: panel_util.o
92 diff -upr clean/matchbox-panel-0.9.2/src/session.c matchbox-panel-0.9.2/src/session.c
93 --- clean/matchbox-panel-0.9.2/src/session.c 2005-03-20 17:43:33.000000000 +0000
94 +++ matchbox-panel-0.9.2/src/session.c 2006-01-12 20:24:15.986768648 +0000
95 @@ -235,23 +235,39 @@ session_preexisting_clear_current(MBPane
96 panel->session_entry_cur[0] = '\0';
100 -session_preexisting_handle_timeouts(MBPanel *panel)
102 +session_preexisting_set_timeout(MBPanel *panel, struct timeval *tv, struct timeval **tvp)
104 - if (!session_preexisting_restarting(panel)) return False;
106 - /* DBG("%s() called\n", __func__); */
109 - /* catch session timeouts */
110 - if (panel->session_entry_cur[0] != '\0')
113 - if ( (time(NULL)-panel->session_start_time) > SESSION_TIMEOUT)
114 + if (!session_preexisting_restarting(panel))
117 + if (panel->session_entry_cur[0] == '\0')
120 + timeleft = SESSION_TIMEOUT - (time (NULL) - panel->session_start_time);
124 fprintf(stderr, "Session timeout on %s\n", panel->session_entry_cur);
125 session_preexisting_clear_current(panel);
126 session_preexisting_start_next(panel);
133 + if (!*tvp || tv->tv_sec > timeleft)
136 + tv->tv_sec = timeleft;
143 diff -upr clean/matchbox-panel-0.9.2/src/session.h matchbox-panel-0.9.2/src/session.h
144 --- clean/matchbox-panel-0.9.2/src/session.h 2005-03-20 17:43:33.000000000 +0000
145 +++ matchbox-panel-0.9.2/src/session.h 2006-01-12 20:24:37.310526944 +0000
146 @@ -28,7 +28,7 @@ Bool session_preexisting_win_matches_wan
148 void session_preexisting_clear_current(MBPanel *panel);
150 -Bool session_preexisting_handle_timeouts(MBPanel *panel);
151 +Bool session_preexisting_set_timeout(MBPanel *panel, struct timeval *tv, struct timeval **tvp);
153 Bool session_preexisting_get_next(MBPanel *panel);