From 69955be31f34e6704d96816c5ce298801e0dfb14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sl=C3=A1vek=20Banko?= Date: Thu, 19 Sep 2024 01:15:08 +0200 Subject: [PATCH] DEB compiz: Workaround for broken startup-notification api that uses a long where it should have used time_t. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Slávek Banko --- .../compiz-trinity-0.8.4/debian/changelog | 6 ++++ .../debian/patches/107-sn-api-workaround.diff | 32 +++++++++++++++++++ .../debian/patches/series | 1 + 3 files changed, 39 insertions(+) create mode 100644 debian/compiz-trinity/compiz-trinity-0.8.4/debian/patches/107-sn-api-workaround.diff diff --git a/debian/compiz-trinity/compiz-trinity-0.8.4/debian/changelog b/debian/compiz-trinity/compiz-trinity-0.8.4/debian/changelog index 8cc21ad4..cd219f4b 100644 --- a/debian/compiz-trinity/compiz-trinity-0.8.4/debian/changelog +++ b/debian/compiz-trinity/compiz-trinity-0.8.4/debian/changelog @@ -1,3 +1,9 @@ +compiz-trinity (0.8.4-3debian13.0.0+13~a) trixie; urgency=low + + * Workaround for broken startup-notification api. + + -- Slávek Banko Thu, 19 Sep 2024 01:13:03 +0200 + compiz-trinity (0.8.4-3debian13.0.0+12~a) trixie; urgency=low * Adapt to latest tqt3 diff --git a/debian/compiz-trinity/compiz-trinity-0.8.4/debian/patches/107-sn-api-workaround.diff b/debian/compiz-trinity/compiz-trinity-0.8.4/debian/patches/107-sn-api-workaround.diff new file mode 100644 index 00000000..d702ca16 --- /dev/null +++ b/debian/compiz-trinity/compiz-trinity-0.8.4/debian/patches/107-sn-api-workaround.diff @@ -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); diff --git a/debian/compiz-trinity/compiz-trinity-0.8.4/debian/patches/series b/debian/compiz-trinity/compiz-trinity-0.8.4/debian/patches/series index 9feac7eb..bb443646 100644 --- a/debian/compiz-trinity/compiz-trinity-0.8.4/debian/patches/series +++ b/debian/compiz-trinity/compiz-trinity-0.8.4/debian/patches/series @@ -27,3 +27,4 @@ kubuntu_04_trinity.patch 104-incompabible-pointer-types.diff 105-malloc-free-implicit-declaration.diff 106-adapt-tqt3.diff +107-sn-api-workaround.diff