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 230ee4d9e9948b81af3cc4a8d04b24ede5c795ed
Author: Kim Woelders <k...@woelders.dk>
AuthorDate: Sat Aug 12 17:29:42 2023 +0200

    Update non-active desk pagers when background is changed
    
    https://git.enlightenment.org/e16/e16/issues/11
---
 src/desktops.c | 18 +++++++++++-------
 src/desktops.h |  3 ++-
 2 files changed, 13 insertions(+), 8 deletions(-)

diff --git a/src/desktops.c b/src/desktops.c
index 082beadf..eac786ac 100644
--- a/src/desktops.c
+++ b/src/desktops.c
@@ -611,15 +611,14 @@ _DeskBackgroundRefresh(Desk * dsk, int why)
 
    switch (why)
      {
+     case DESK_BG_CHANGED:
+	changed = 1;
+	/* FALLTHROUGH */
      case DESK_BG_REFRESH:
 	if (bg && dsk->viewable)
 	   BackgroundTouch(bg);
 	break;
 
-     case DESK_BG_RECONFIGURE_ALL:
-	reconfigure = 1;
-	break;
-
      case DESK_BG_TIMEOUT:
 	if (bg && dsk->viewable)
 	   BackgroundTouch(bg);
@@ -629,6 +628,10 @@ _DeskBackgroundRefresh(Desk * dsk, int why)
 	if (!bg || dsk->viewable)
 	   return;
 	break;
+
+     case DESK_BG_RECONFIGURE_ALL:
+	reconfigure = 1;
+	break;
      }
 
    if (bg)
@@ -652,9 +655,10 @@ _DeskBackgroundRefresh(Desk * dsk, int why)
 	  }
 	else
 	  {
+#if 0				/* FIXME - Does removing this break something? */
 	     if (dsk->bg.pmap == NoXID)
 		return;
-
+#endif
 	     pmap = NoXID;
 	     pixel = 0;
 	     dsk->bg.seq_no = 0;
@@ -705,7 +709,7 @@ DeskBackgroundSet(Desk * dsk, Background * bg)
 
    dsk->bg.bg = bg;
 
-   _DeskBackgroundRefresh(dsk, DESK_BG_REFRESH);
+   _DeskBackgroundRefresh(dsk, DESK_BG_CHANGED);
 }
 
 void
@@ -2170,7 +2174,7 @@ _DeskPropertyChange(Desk * dsk, XEvent * ev)
 	   return;
 	Mode.root.ext_pmap = pmap;
 	Mode.root.ext_pmap_valid = EXDrawableOk(pmap);
-	DesksBackgroundRefresh(NULL, DESK_BG_REFRESH);
+	DesksBackgroundRefresh(NULL, DESK_BG_CHANGED);
      }
    else if (ev->xproperty.atom == ea_m._XROOTCOLOR_PIXEL)
      {
diff --git a/src/desktops.h b/src/desktops.h
index 2d7f83e0..c25317a4 100644
--- a/src/desktops.h
+++ b/src/desktops.h
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors
- * Copyright (C) 2004-2022 Kim Woelders
+ * Copyright (C) 2004-2023 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
@@ -29,6 +29,7 @@
 
 #define USE_BG_WIN_ON_ALL_DESKS 0
 
+#define DESK_BG_CHANGED         0
 #define DESK_BG_REFRESH         1
 #define DESK_BG_FREE            2
 #define DESK_BG_TIMEOUT         3

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

Reply via email to