pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/wm/fvwm fvwm: backport fix for locking issues with lib...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/a0d98ec4e296
branches:  trunk
changeset: 387020:a0d98ec4e296
user:      gutteridge <gutteridge%pkgsrc.org@localhost>
date:      Thu Oct 20 00:39:50 2022 +0000

description:
fvwm: backport fix for locking issues with libX11 1.8.1

Issue reported and patches tested by John D. Baker, on NetBSD-Users@.

diffstat:

 wm/fvwm/Makefile                    |   4 ++--
 wm/fvwm/distinfo                    |   5 ++++-
 wm/fvwm/patches/patch-fvwm_events.c |  30 ++++++++++++++++++++++++++++++
 wm/fvwm/patches/patch-libs_FEvent.c |  36 ++++++++++++++++++++++++++++++++++++
 wm/fvwm/patches/patch-libs_FEvent.h |  22 ++++++++++++++++++++++
 5 files changed, 94 insertions(+), 3 deletions(-)

diffs (128 lines):

diff -r c05eb98be400 -r a0d98ec4e296 wm/fvwm/Makefile
--- a/wm/fvwm/Makefile  Thu Oct 20 00:30:46 2022 +0000
+++ b/wm/fvwm/Makefile  Thu Oct 20 00:39:50 2022 +0000
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.61 2022/08/02 01:05:02 gutteridge Exp $
+# $NetBSD: Makefile,v 1.62 2022/10/20 00:39:50 gutteridge Exp $
 
 DISTNAME=      fvwm-${FVWM_VER}
-PKGREVISION=   14
+PKGREVISION=   15
 CATEGORIES=    wm x11
 MASTER_SITES=  ${MASTER_SITE_GITHUB:=fvwmorg/}
 GITHUB_RELEASE=        ${FVWM_VER}
diff -r c05eb98be400 -r a0d98ec4e296 wm/fvwm/distinfo
--- a/wm/fvwm/distinfo  Thu Oct 20 00:30:46 2022 +0000
+++ b/wm/fvwm/distinfo  Thu Oct 20 00:39:50 2022 +0000
@@ -1,7 +1,10 @@
-$NetBSD: distinfo,v 1.9 2021/10/26 11:25:13 nia Exp $
+$NetBSD: distinfo,v 1.10 2022/10/20 00:39:50 gutteridge Exp $
 
 BLAKE2s (fvwm-2.6.9.tar.gz) = 59e97f514d9192e4d8c6de287ab63a78ba6f742dfbce87597f26f6f5cf642915
 SHA512 (fvwm-2.6.9.tar.gz) = a9c2214ad19edd17da81446a6d4250284cc50b59b53c233212f2a9354c01143dbb870521392752f272f00af50bee2dd8f0b6bf6176b0d4b3075694d2a61a623e
 Size (fvwm-2.6.9.tar.gz) = 3942859 bytes
 SHA1 (patch-ab) = d9e960ed7be624a36af5a8a3ad4422f4ed4ce64e
+SHA1 (patch-fvwm_events.c) = effd8fd31a3c1f28a3e71dbcb9569621d996cc31
 SHA1 (patch-fvwm_fvwm-reproducible.c) = 96515959482750a25bfe59e9a370d0ef0295bc89
+SHA1 (patch-libs_FEvent.c) = 358243d198251c6ea0bf546e31a94cb089355e45
+SHA1 (patch-libs_FEvent.h) = 0dae96a21839945ac9627269608aa1bbafaa8d65
diff -r c05eb98be400 -r a0d98ec4e296 wm/fvwm/patches/patch-fvwm_events.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/wm/fvwm/patches/patch-fvwm_events.c       Thu Oct 20 00:39:50 2022 +0000
@@ -0,0 +1,30 @@
+$NetBSD: patch-fvwm_events.c,v 1.1 2022/10/20 00:39:50 gutteridge Exp $
+
+Backport "Fix for lock recusion in handle_all_expose()"
+https://github.com/fvwmorg/fvwm3/pull/683
+
+--- fvwm/events.c.orig 2018-05-26 11:35:26.000000000 +0000
++++ fvwm/events.c
+@@ -258,6 +258,12 @@ static int _pred_weed_accumulate_expose(
+       return 1;
+ }
+ 
++static int _pred_weed_is_expose(
++      Display *display, XEvent *event, XPointer arg)
++{
++      return (event->type == Expose);
++}
++
+ static int _pred_weed_handle_expose(
+       Display *display, XEvent *event, XPointer arg)
+ {
+@@ -4542,7 +4548,8 @@ void handle_all_expose(void)
+ 
+       saved_event = fev_save_event();
+       FPending(dpy);
+-      FWeedIfEvents(dpy, _pred_weed_handle_expose, NULL);
++      FWeedAndHandleIfEvents(dpy, _pred_weed_is_expose,
++                             _pred_weed_handle_expose, NULL);
+       fev_restore_event(saved_event);
+ 
+       return;
diff -r c05eb98be400 -r a0d98ec4e296 wm/fvwm/patches/patch-libs_FEvent.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/wm/fvwm/patches/patch-libs_FEvent.c       Thu Oct 20 00:39:50 2022 +0000
@@ -0,0 +1,36 @@
+$NetBSD: patch-libs_FEvent.c,v 1.1 2022/10/20 00:39:50 gutteridge Exp $
+
+Backport "Fix for lock recusion in handle_all_expose()"
+https://github.com/fvwmorg/fvwm3/pull/683
+
+--- libs/FEvent.c.orig 2018-05-26 11:35:26.000000000 +0000
++++ libs/FEvent.c
+@@ -532,6 +532,28 @@ int FWeedIfEvents(
+       return weed_args.count;
+ }
+ 
++int FWeedAndHandleIfEvents(
++      Display *display,
++      int (*weed_predicate) (Display *display, XEvent *event, XPointer arg),
++      int (*handler) (Display *display, XEvent *event, XPointer arg),
++      XPointer arg)
++{
++      _fev_weed_args weed_args;
++      XEvent e;
++
++      assert(fev_is_invalid_event_type_set);
++      memset(&weed_args, 0, sizeof(weed_args));
++      weed_args.weed_predicate = weed_predicate;
++      weed_args.arg = arg;
++      if (FCheckPeekIfEvent(display, &e, _fev_pred_weed_if,
++                            (XPointer)&weed_args)) {
++              handler(display, &e, arg);
++      }
++      _fev_pred_weed_if_finish(&weed_args);
++
++      return weed_args.count;
++}
++
+ int FWeedIfWindowEvents(
+       Display *display, Window window,
+       int (*weed_predicate) (
diff -r c05eb98be400 -r a0d98ec4e296 wm/fvwm/patches/patch-libs_FEvent.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/wm/fvwm/patches/patch-libs_FEvent.h       Thu Oct 20 00:39:50 2022 +0000
@@ -0,0 +1,22 @@
+$NetBSD: patch-libs_FEvent.h,v 1.1 2022/10/20 00:39:50 gutteridge Exp $
+
+Backport "Fix for lock recusion in handle_all_expose()"
+https://github.com/fvwmorg/fvwm3/pull/683
+
+--- libs/FEvent.h.orig 2016-10-15 14:51:45.000000000 +0000
++++ libs/FEvent.h
+@@ -113,6 +113,14 @@ int FWeedIfEvents(
+               Display *display, XEvent *current_event, XPointer arg),
+       XPointer arg);
+ 
++/* Same as FWeedIfEvents but with a second callback out of XLockDisplay()
++ * to handle events in a lock-safe manner */
++int FWeedAndHandleIfEvents(
++      Display *display,
++      int (*weed_predicate) (Display *display, XEvent *event, XPointer arg),
++      int (*handler) (Display *display, XEvent *event, XPointer arg),
++      XPointer arg);
++
+ /* Same as FWeedIfEvents but weeds only events for the given window.  The
+  * weed_predicate is only called for events with a matching window.  */
+ int FWeedIfWindowEvents(



Home | Main Index | Thread Index | Old Index