From 796f7c999ae53b99eb7f9aea88895616322fb5fe Mon Sep 17 00:00:00 2001 From: David Reveman Date: Wed, 3 Sep 2008 14:52:46 +0200 Subject: [PATCH] Fix reverse walking of window properties and make sure dmxBECreateWindowProperties works when panoramix is disabled. --- hw/dmx/dmxextension.c | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/hw/dmx/dmxextension.c b/hw/dmx/dmxextension.c index 0b11667ca..f00de9cd8 100644 --- a/hw/dmx/dmxextension.c +++ b/hw/dmx/dmxextension.c @@ -919,31 +919,30 @@ static void dmxBEMapRootWindow(int idx) static void dmxBECreateWindowProperties (int idx) { WindowPtr pRoot = WindowTable[idx]; - WindowPtr pRoot0 = WindowTable[0]; + WindowPtr pRoot0 = pRoot; WindowPtr pWin; WindowPtr pWin0; PropertyPtr pProp, pLast; +#ifdef PANORAMIX + if (!noPanoramiXExtension) + pRoot0 = WindowTable[0]; +#endif + pWin = pRoot; pWin0 = pRoot0; while (pWin) { pLast = NULL; - for (;;) + do { for (pProp = wUserProps (pWin0); pProp; pProp = pProp->next) - { - if (pProp == pLast) + if (pProp->next == pLast) break; - pLast = pProp; - } - - if (!pLast) - break; - - dmxBESetWindowProperty (pWin, pLast); - } + if (pProp) + dmxBESetWindowProperty (pWin, (pLast = pProp)); + } while (pLast != wUserProps (pWin0)); /* Next, create the bottom-most child */ if (pWin->lastChild) {