diff options
Diffstat (limited to 'src/sna/fb')
-rw-r--r-- | src/sna/fb/fb.h | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/sna/fb/fb.h b/src/sna/fb/fb.h index 3339236e..215aec99 100644 --- a/src/sna/fb/fb.h +++ b/src/sna/fb/fb.h @@ -28,15 +28,15 @@ #include "config.h" #endif -#include <stdbool.h> -#include <pixman.h> - #include <xorg-server.h> #include <servermd.h> #include <gcstruct.h> #include <colormap.h> #include <windowstr.h> +#include <stdbool.h> +#include <pixman.h> + #if HAS_DEBUG_FULL #define DBG(x) ErrorF x #else @@ -288,13 +288,17 @@ typedef struct { unsigned char bpp; /* current drawable bpp */ } FbGCPrivate, *FbGCPrivPtr; +extern DevPrivateKeyRec sna_gc_key; +extern DevPrivateKeyRec sna_window_key; + static inline FbGCPrivate *fb_gc(GCPtr gc) { - return (FbGCPrivate *)gc->devPrivates; + return dixGetPrivateAddr(&gc->devPrivates, &sna_gc_key); } + static inline PixmapPtr fbGetWindowPixmap(WindowPtr window) { - return *(void **)window->devPrivates; + return *(PixmapPtr *)dixGetPrivateAddr(&window->devPrivates, &sna_window_key); } #ifdef ROOTLESS |