forked from e16/e16
1
0
Fork 0

Update non-active desk pagers when background is changed

e16/e16#11
This commit is contained in:
Kim Woelders 2023-08-12 17:29:42 +02:00
parent bed85d0f42
commit 230ee4d9e9
2 changed files with 13 additions and 8 deletions

View File

@ -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)
{

View File

@ -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