summaryrefslogtreecommitdiff
path: root/afb/afbwindow.c
diff options
context:
space:
mode:
authorEamon Walsh <ewalsh@tycho.nsa.gov>2007-08-28 09:28:25 -0400
committerEamon Walsh <ewalsh@moss-charon.epoch.ncsc.mil>2007-08-28 09:28:25 -0400
commit4017d3190234e189a0bbd33193a148d4d3c7556b (patch)
tree2ab228113d410386afde50c893f137d95974b8f3 /afb/afbwindow.c
parent85547073265ae9bc4ae3af920a6d3214fd1ca0c5 (diff)
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.
Diffstat (limited to 'afb/afbwindow.c')
-rw-r--r--afb/afbwindow.c19
1 files changed, 12 insertions, 7 deletions
diff --git a/afb/afbwindow.c b/afb/afbwindow.c
index a4a1602bc..1d99fe14d 100644
--- a/afb/afbwindow.c
+++ b/afb/afbwindow.c
@@ -56,6 +56,7 @@ SOFTWARE.
#include <X11/X.h>
#include "scrnintstr.h"
#include "windowstr.h"
+#include "privates.h"
#include "afb.h"
#include "mistruct.h"
#include "regionstr.h"
@@ -67,14 +68,16 @@ afbCreateWindow(pWin)
{
register afbPrivWin *pPrivWin;
- pPrivWin = (afbPrivWin *)(pWin->devPrivates[afbWindowPrivateIndex].ptr);
+ pPrivWin = (afbPrivWin *)dixLookupPrivate(&pWin->devPrivates,
+ afbWindowPrivateKey);
pPrivWin->pRotatedBorder = NullPixmap;
pPrivWin->pRotatedBackground = NullPixmap;
pPrivWin->fastBackground = FALSE;
pPrivWin->fastBorder = FALSE;
#ifdef PIXMAP_PER_WINDOW
- pWin->devPrivates[frameWindowPrivateIndex].ptr =
- pWin->pDrawable.pScreen->devPrivates[afbScreenPrivateIndex].ptr;
+ dixSetPrivate(&pWin->devPrivates, frameWindowPrivateKey,
+ dixLookupPrivate(&pWin->pDrawable.pScreen->devPrivates,
+ afbScreenPrivateKey));
#endif
return (TRUE);
@@ -88,8 +91,8 @@ afbDestroyWindow(pWin)
{
register afbPrivWin *pPrivWin;
- pPrivWin = (afbPrivWin *)(pWin->devPrivates[afbWindowPrivateIndex].ptr);
-
+ pPrivWin = (afbPrivWin *)dixLookupPrivate(&pWin->devPrivates,
+ afbWindowPrivateKey);
if (pPrivWin->pRotatedBorder)
(*pWin->drawable.pScreen->DestroyPixmap)(pPrivWin->pRotatedBorder);
if (pPrivWin->pRotatedBackground)
@@ -123,7 +126,8 @@ afbPositionWindow(pWin, x, y)
register afbPrivWin *pPrivWin;
int reset = 0;
- pPrivWin = (afbPrivWin *)(pWin->devPrivates[afbWindowPrivateIndex].ptr);
+ pPrivWin = (afbPrivWin *)dixLookupPrivate(&pWin->devPrivates,
+ afbWindowPrivateKey);
if (pWin->backgroundState == BackgroundPixmap && pPrivWin->fastBackground) {
afbXRotatePixmap(pPrivWin->pRotatedBackground,
pWin->drawable.x - pPrivWin->oldRotate.x);
@@ -230,7 +234,8 @@ afbChangeWindowAttributes(pWin, mask)
register afbPrivWin *pPrivWin;
WindowPtr pBgWin;
- pPrivWin = (afbPrivWin *)(pWin->devPrivates[afbWindowPrivateIndex].ptr);
+ pPrivWin = (afbPrivWin *)dixLookupPrivate(&pWin->devPrivates,
+ afbWindowPrivateKey);
/*
* When background state changes from ParentRelative and
* we had previously rotated the fast border pixmap to match