mirror of
https://github.com/X11Libre/xserver.git
synced 2026-10-01 22:03:09 +00:00
devPrivates rework: since API is already broken, switch everything
over to new system. Need to update documentation and address some remaining vestiges of old system such as CursorRec structure, fb "offman" structure, and FontRec privates.
This commit is contained in:
parent
8554707326
commit
4017d31902
261 changed files with 1642 additions and 3957 deletions
|
|
@ -10,6 +10,7 @@
|
|||
#include "mi.h"
|
||||
#include "gcstruct.h"
|
||||
#include "regionstr.h"
|
||||
#include "privates.h"
|
||||
#include "mivalidate.h"
|
||||
#include "mioverlay.h"
|
||||
#include "migc.h"
|
||||
|
|
@ -53,9 +54,8 @@ typedef struct {
|
|||
Bool copyUnderlay;
|
||||
} miOverlayScreenRec, *miOverlayScreenPtr;
|
||||
|
||||
static unsigned long miOverlayGeneration = 0;
|
||||
static int miOverlayWindowIndex = -1;
|
||||
static int miOverlayScreenIndex = -1;
|
||||
static DevPrivateKey miOverlayWindowKey = &miOverlayWindowKey;
|
||||
static DevPrivateKey miOverlayScreenKey = &miOverlayScreenKey;
|
||||
|
||||
static void RebuildTree(WindowPtr);
|
||||
static Bool HasUnderlayChildren(WindowPtr);
|
||||
|
|
@ -85,10 +85,10 @@ static void miOverlaySetShape(WindowPtr);
|
|||
#endif
|
||||
static void miOverlayChangeBorderWidth(WindowPtr, unsigned int);
|
||||
|
||||
#define MIOVERLAY_GET_SCREEN_PRIVATE(pScreen) \
|
||||
((miOverlayScreenPtr)((pScreen)->devPrivates[miOverlayScreenIndex].ptr))
|
||||
#define MIOVERLAY_GET_WINDOW_PRIVATE(pWin) \
|
||||
((miOverlayWindowPtr)((pWin)->devPrivates[miOverlayWindowIndex].ptr))
|
||||
#define MIOVERLAY_GET_SCREEN_PRIVATE(pScreen) ((miOverlayScreenPtr) \
|
||||
dixLookupPrivate(&(pScreen)->devPrivates, miOverlayScreenKey))
|
||||
#define MIOVERLAY_GET_WINDOW_PRIVATE(pWin) ((miOverlayWindowPtr) \
|
||||
dixLookupPrivate(&(pWin)->devPrivates, miOverlayWindowKey))
|
||||
#define MIOVERLAY_GET_WINDOW_TREE(pWin) \
|
||||
(MIOVERLAY_GET_WINDOW_PRIVATE(pWin)->tree)
|
||||
|
||||
|
|
@ -112,22 +112,13 @@ miInitOverlay(
|
|||
|
||||
if(!inOverlayFunc || !transFunc) return FALSE;
|
||||
|
||||
if(miOverlayGeneration != serverGeneration) {
|
||||
if(((miOverlayScreenIndex = AllocateScreenPrivateIndex()) < 0) ||
|
||||
((miOverlayWindowIndex = AllocateWindowPrivateIndex()) < 0))
|
||||
return FALSE;
|
||||
|
||||
miOverlayGeneration = serverGeneration;
|
||||
}
|
||||
|
||||
if(!AllocateWindowPrivate(pScreen, miOverlayWindowIndex,
|
||||
sizeof(miOverlayWindowRec)))
|
||||
if(!dixRequestPrivate(miOverlayWindowKey, sizeof(miOverlayWindowRec)))
|
||||
return FALSE;
|
||||
|
||||
if(!(pScreenPriv = xalloc(sizeof(miOverlayScreenRec))))
|
||||
return FALSE;
|
||||
|
||||
pScreen->devPrivates[miOverlayScreenIndex].ptr = (pointer)pScreenPriv;
|
||||
dixSetPrivate(&pScreen->devPrivates, miOverlayScreenKey, pScreenPriv);
|
||||
|
||||
pScreenPriv->InOverlay = inOverlayFunc;
|
||||
pScreenPriv->MakeTransparent = transFunc;
|
||||
|
|
|
|||
Loading…
Reference in a new issue