This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch master
in repository e16.

View the commit online.

commit 98e76d30ffdba2464b11d81366e68da85d707fd7
Author: Kim Woelders <[email protected]>
AuthorDate: Sat Feb 28 14:54:41 2026 +0100

    pagers: Fix pagers stopping to update some window miniatures
    
    Could happen in live update mode.
    Presumably around where sequence number crosses 0x80000000.
---
 src/ecompmgr.c |  3 ++-
 src/eobj.h     |  5 ++++-
 src/pager.c    | 21 +++++++--------------
 3 files changed, 13 insertions(+), 16 deletions(-)

diff --git a/src/ecompmgr.c b/src/ecompmgr.c
index 63ec1c1a..8ae09356 100644
--- a/src/ecompmgr.c
+++ b/src/ecompmgr.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2004-2023 Kim Woelders
+ * Copyright (C) 2004-2026 Kim Woelders
  *
  * Permission is hereby granted, free of charge, to any person obtaining a copy
  * of this software and associated documentation files (the "Software"), to
@@ -1548,6 +1548,7 @@ ECompMgrWinDamage(EObj *eo, XEvent *ev)
                          EobjGetY(eo) + EobjGetBW(eo));
     }
     eo->serial = ev->xany.serial;
+    eo->damaged = 1;
     ECompMgrDamageMergeObject(eo, parts);
 
     if (eo->type == EOBJ_TYPE_EWIN)
diff --git a/src/eobj.h b/src/eobj.h
index 12ce0ba3..f5a75bf7 100644
--- a/src/eobj.h
+++ b/src/eobj.h
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2004-2022 Kim Woelders
+ * Copyright (C) 2004-2026 Kim Woelders
  *
  * Permission is hereby granted, free of charge, to any person obtaining a copy
  * of this software and associated documentation files (the "Software"), to
@@ -48,6 +48,7 @@ struct _eobj {
     unsigned        fade:1;     /* Enable fading */
     unsigned        fading:1;   /* Is fading */
     unsigned        ghost:1;    /* Ghost window */
+    unsigned        damaged:1;  /* Used by pagers */
     struct {
         char           *wm_name;
         char           *wm_res_name;
@@ -123,6 +124,8 @@ struct _eobj {
 #define EoSetNoRedirect(eo, _x) EoObj(eo)->noredir = (_x)
 #define EoSetOpacity(eo, _o)    EoObj(eo)->opacity = (_o)
 #define EoSetShadow(eo, _x)     EoObj(eo)->shadow = (_x)
+#define EoIsDamaged(eo)         (EoObj(eo)->damaged)
+#define EoClrDamaged(eo)        EoObj(eo)->damaged = 0
 #if USE_COMPOSITE
 #define EoGetOpacity(eo)        (EoObj(eo)->opacity)
 #define EoGetFade(eo)           (EoObj(eo)->fade)
diff --git a/src/pager.c b/src/pager.c
index b84a5ea0..0fc5d924 100644
--- a/src/pager.c
+++ b/src/pager.c
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors
- * Copyright (C) 2004-2022 Kim Woelders
+ * Copyright (C) 2004-2026 Kim Woelders
  *
  * Permission is hereby granted, free of charge, to any person obtaining a copy
  * of this software and associated documentation files (the "Software"), to
@@ -113,8 +113,6 @@ typedef struct {
     char            do_update;
     int             x1, y1, x2, y2;
     float           scale;
-    unsigned int    serial;
-    int             serdif;
 } Pager;
 
 static void     PagerScanCancel(Pager * p);
@@ -332,7 +330,7 @@ PagerHiwinUpdate(Hiwin *phi, Pager *p __UNUSED__, EWin *ewin)
 static void
 PagerEwinUpdateMini(Pager *p, EWin *ewin)
 {
-    int             w, h, update, use_iclass, serdif;
+    int             w, h, update, use_iclass;
     EX_Drawable     draw;
     int             pager_mode = PagersGetMode();
 
@@ -344,26 +342,24 @@ PagerEwinUpdateMini(Pager *p, EWin *ewin)
     if (h < 1)
         h = 1;
 
-    serdif = EoGetSerial(ewin) - p->serial;
-
     update = 0;
     if (!ewin->mini_pmm.pmap)
         update = 1;
     if (ewin->mini_pmm.w != w || ewin->mini_pmm.h != h)
         update = 1;
 
-    if (serdif > 0 && ewin->type != EWIN_TYPE_PAGER &&
+    if (EoIsDamaged(ewin) && ewin->type != EWIN_TYPE_PAGER &&
         pager_mode == PAGER_MODE_LIVE && Mode.mode == 0)
         update = 1;
-    if (serdif > p->serdif)
-        p->serdif = serdif;
 
     if (!update)
         return;
 
-    Dprintf("%s %#x/%#x wxh=%dx%d ser=%#x/%#x dif=%d: %s\n", __func__,
+    Dprintf("%s %#x/%#x wxh=%dx%d ser=%#x dmg=%d: %s\n", __func__,
             EwinGetClientXwin(ewin), EoGetXwin(ewin), w, h,
-            EoGetSerial(ewin), p->serial, serdif, EwinGetTitle(ewin));
+            EoGetSerial(ewin), EoIsDamaged(ewin), EwinGetTitle(ewin));
+
+    EoClrDamaged(ewin);
 
     p->do_update = 1;
 
@@ -447,9 +443,6 @@ doPagerUpdate(Pager *p)
 
         PagerEwinUpdateMini(p, ewin);
     }
-    if (p->serdif > 0)
-        p->serial += p->serdif;
-    p->serdif = 0;
 
     if (!p->do_update)
         return;

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.

Reply via email to