mirror of
https://github.com/X11Libre/xserver.git
synced 2026-03-24 03:44:06 +00:00
Rework composite overlay window code to fix several resource management bugs.
The composite overlay window code had several misunderstandings of the workings of the X server, in particular error handling paths would often double-free objects. Clean all of this up by using resource destruction as the sole mechanism for freeing resource-based objects.
This commit is contained in:
@@ -155,6 +155,7 @@ typedef struct _CompScreen {
|
||||
VisualID *alternateVisuals;
|
||||
|
||||
WindowPtr pOverlayWin;
|
||||
Window overlayWid;
|
||||
CompOverlayClientPtr pOverlayClients;
|
||||
|
||||
} CompScreenRec, *CompScreenPtr;
|
||||
@@ -172,6 +173,7 @@ extern DevPrivateKey CompSubwindowsPrivateKey;
|
||||
|
||||
extern RESTYPE CompositeClientWindowType;
|
||||
extern RESTYPE CompositeClientSubwindowsType;
|
||||
extern RESTYPE CompositeClientOverlayType;
|
||||
|
||||
/*
|
||||
* compalloc.c
|
||||
@@ -229,6 +231,25 @@ CompositeRegisterAlternateVisuals (ScreenPtr pScreen,
|
||||
Bool
|
||||
compScreenInit (ScreenPtr pScreen);
|
||||
|
||||
/*
|
||||
* compoverlay.c
|
||||
*/
|
||||
|
||||
void
|
||||
compFreeOverlayClient (CompOverlayClientPtr pOcToDel);
|
||||
|
||||
CompOverlayClientPtr
|
||||
compFindOverlayClient (ScreenPtr pScreen, ClientPtr pClient);
|
||||
|
||||
CompOverlayClientPtr
|
||||
compCreateOverlayClient (ScreenPtr pScreen, ClientPtr pClient);
|
||||
|
||||
Bool
|
||||
compCreateOverlayWindow (ScreenPtr pScreen);
|
||||
|
||||
void
|
||||
compDestroyOverlayWindow (ScreenPtr pScreen);
|
||||
|
||||
/*
|
||||
* compwindow.c
|
||||
*/
|
||||
@@ -292,9 +313,6 @@ compCopyWindow (WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc);
|
||||
void
|
||||
compWindowUpdate (WindowPtr pWin);
|
||||
|
||||
void
|
||||
deleteCompOverlayClientsForScreen (ScreenPtr pScreen);
|
||||
|
||||
WindowPtr
|
||||
CompositeRealChildHead (WindowPtr pWin);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user