~ubuntu-branches/ubuntu/precise/xorg-server/precise-updates

« back to all changes in this revision

Viewing changes to composite/compwindow.c

  • Committer: Package Import Robot
  • Author(s): Christopher James Halse Rogers
  • Date: 2012-01-23 16:09:29 UTC
  • mfrom: (1.1.46) (0.11.34 sid)
  • Revision ID: package-import@ubuntu.com-20120123160929-k4xdb9b7xeesiukp
Tags: 2:1.11.3-0ubuntu8
* debian/patches/224_return_BadWindow_not_BadMatch.diff:
  - Fix the error values of a whole slew of window-related calls.
    Fixes some gnome-settings-daemon aborts in XLib (LP: #903973)

Show diffs side-by-side

added added

removed removed

Lines of Context:
164
164
    {
165
165
        if (should)
166
166
            return compAllocPixmap (pWin);
 
167
        else {
 
168
            ScreenPtr pScreen = pWin->drawable.pScreen;
 
169
            PixmapPtr pPixmap = (*pScreen->GetWindowPixmap) (pWin);
 
170
            compSetParentPixmap (pWin);
 
171
            compRestoreWindow (pWin, pPixmap);
 
172
            (*pScreen->DestroyPixmap) (pPixmap);
 
173
        }
 
174
    } else if (should) {
 
175
        if (cw->update == CompositeRedirectAutomatic)
 
176
            pWin->redirectDraw = RedirectDrawAutomatic;
167
177
        else
168
 
            compFreePixmap (pWin);
 
178
            pWin->redirectDraw = RedirectDrawManual;
169
179
    }
170
180
    return TRUE;
171
181
}
583
593
    while ((csw = GetCompSubwindows (pWin)))
584
594
        FreeResource (csw->clients->id, RT_NONE);
585
595
 
586
 
    if (pWin->redirectDraw != RedirectDrawNone)
587
 
        compFreePixmap (pWin);
 
596
    if (pWin->redirectDraw != RedirectDrawNone) {
 
597
        PixmapPtr pPixmap = (*pScreen->GetWindowPixmap) (pWin);
 
598
        compSetParentPixmap (pWin);
 
599
        (*pScreen->DestroyPixmap) (pPixmap);
 
600
    }
588
601
    ret = (*pScreen->DestroyWindow) (pWin);
589
602
    cs->DestroyWindow = pScreen->DestroyWindow;
590
603
    pScreen->DestroyWindow = compDestroyWindow;