that uses a long where it should have used time_t. Signed-off-by: Slávek Banko <slavek.banko@axis.cz>pull/26/head
parent
bb60884854
commit
69955be31f
@ -0,0 +1,32 @@
|
||||
Index: compiz-trinity-0.8.4/src/screen.c
|
||||
===================================================================
|
||||
--- compiz-trinity-0.8.4.orig/src/screen.c
|
||||
+++ compiz-trinity-0.8.4/src/screen.c
|
||||
@@ -729,19 +729,22 @@ startupSequenceTimeout (void *data)
|
||||
{
|
||||
CompScreen *screen = data;
|
||||
CompStartupSequence *s;
|
||||
- struct timeval now, active;
|
||||
+ struct timeval now;
|
||||
double elapsed;
|
||||
+ long secs, usecs;
|
||||
|
||||
gettimeofday (&now, NULL);
|
||||
|
||||
for (s = screen->startupSequences; s; s = s->next)
|
||||
{
|
||||
+ /* workaround for broken startup-notification api that uses
|
||||
+ a long where it should have used time_t */
|
||||
sn_startup_sequence_get_last_active_time (s->sequence,
|
||||
- &active.tv_sec,
|
||||
- &active.tv_usec);
|
||||
+ &secs,
|
||||
+ &usecs);
|
||||
|
||||
- elapsed = ((((double) now.tv_sec - active.tv_sec) * 1000000.0 +
|
||||
- (now.tv_usec - active.tv_usec))) / 1000.0;
|
||||
+ elapsed = ((((double) now.tv_sec - secs) * 1000000.0 +
|
||||
+ (now.tv_usec - usecs))) / 1000.0;
|
||||
|
||||
if (elapsed > STARTUP_TIMEOUT_DELAY)
|
||||
sn_startup_sequence_complete (s->sequence);
|
Loading…
Reference in new issue