pkgsrc-Changes archive

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

CVS commit: pkgsrc/wm/fvwm



Module Name:    pkgsrc
Committed By:   gutteridge
Date:           Thu Oct 20 00:39:50 UTC 2022

Modified Files:
        pkgsrc/wm/fvwm: Makefile distinfo
Added Files:
        pkgsrc/wm/fvwm/patches: patch-fvwm_events.c patch-libs_FEvent.c
            patch-libs_FEvent.h

Log Message:
fvwm: backport fix for locking issues with libX11 1.8.1

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


To generate a diff of this commit:
cvs rdiff -u -r1.61 -r1.62 pkgsrc/wm/fvwm/Makefile
cvs rdiff -u -r1.9 -r1.10 pkgsrc/wm/fvwm/distinfo
cvs rdiff -u -r0 -r1.1 pkgsrc/wm/fvwm/patches/patch-fvwm_events.c \
    pkgsrc/wm/fvwm/patches/patch-libs_FEvent.c \
    pkgsrc/wm/fvwm/patches/patch-libs_FEvent.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/wm/fvwm/Makefile
diff -u pkgsrc/wm/fvwm/Makefile:1.61 pkgsrc/wm/fvwm/Makefile:1.62
--- pkgsrc/wm/fvwm/Makefile:1.61        Tue Aug  2 01:05:02 2022
+++ pkgsrc/wm/fvwm/Makefile     Thu Oct 20 00:39:50 2022
@@ -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}

Index: pkgsrc/wm/fvwm/distinfo
diff -u pkgsrc/wm/fvwm/distinfo:1.9 pkgsrc/wm/fvwm/distinfo:1.10
--- pkgsrc/wm/fvwm/distinfo:1.9 Tue Oct 26 11:25:13 2021
+++ pkgsrc/wm/fvwm/distinfo     Thu Oct 20 00:39:50 2022
@@ -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

Added files:

Index: pkgsrc/wm/fvwm/patches/patch-fvwm_events.c
diff -u /dev/null pkgsrc/wm/fvwm/patches/patch-fvwm_events.c:1.1
--- /dev/null   Thu Oct 20 00:39:50 2022
+++ pkgsrc/wm/fvwm/patches/patch-fvwm_events.c  Thu Oct 20 00:39:50 2022
@@ -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;
Index: pkgsrc/wm/fvwm/patches/patch-libs_FEvent.c
diff -u /dev/null pkgsrc/wm/fvwm/patches/patch-libs_FEvent.c:1.1
--- /dev/null   Thu Oct 20 00:39:50 2022
+++ pkgsrc/wm/fvwm/patches/patch-libs_FEvent.c  Thu Oct 20 00:39:50 2022
@@ -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) (
Index: pkgsrc/wm/fvwm/patches/patch-libs_FEvent.h
diff -u /dev/null pkgsrc/wm/fvwm/patches/patch-libs_FEvent.h:1.1
--- /dev/null   Thu Oct 20 00:39:50 2022
+++ pkgsrc/wm/fvwm/patches/patch-libs_FEvent.h  Thu Oct 20 00:39:50 2022
@@ -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