static void RootlessPaintWindowBackground(WindowPtr pWin, RegionPtr pRegion, int what) { int oldBackgroundState = 0; PixUnion oldBackground; ScreenPtr pScreen = pWin->drawable.pScreen; SCREEN_UNWRAP(pScreen, PaintWindowBackground); RL_DEBUG_MSG("paintwindowbackground start (win 0x%x) ", pWin); if (IsFramedWindow(pWin)) { if (IsRoot(pWin)) { // set root background to magic transparent color oldBackgroundState = pWin->backgroundState; oldBackground = pWin->background; pWin->backgroundState = BackgroundPixel; pWin->background.pixel = 0x00fffffe; } } pScreen->PaintWindowBackground(pWin, pRegion, what); if (IsFramedWindow(pWin)) { RootlessDamageRegion(pWin, pRegion); if (IsRoot(pWin)) { pWin->backgroundState = oldBackgroundState; pWin->background = oldBackground; } } SCREEN_WRAP(pScreen, PaintWindowBackground); RL_DEBUG_MSG("paintwindowbackground end\n"); }