c366016ffe1788c6847d0a967a954713725cab5evboxsync/*
2f0d866e126dd288169fed591c259c1c6b4016e5vboxsync * Common internal rootless definitions and code
2f0d866e126dd288169fed591c259c1c6b4016e5vboxsync */
c366016ffe1788c6847d0a967a954713725cab5evboxsync/*
c366016ffe1788c6847d0a967a954713725cab5evboxsync * Copyright (c) 2001 Greg Parker. All Rights Reserved.
2f0d866e126dd288169fed591c259c1c6b4016e5vboxsync * Copyright (c) 2002-2004 Torrey T. Lyons. All Rights Reserved.
2f0d866e126dd288169fed591c259c1c6b4016e5vboxsync *
86a00a5efe7fdc9725f2076050b996e205259cd6vboxsync * Permission is hereby granted, free of charge, to any person obtaining a
c366016ffe1788c6847d0a967a954713725cab5evboxsync * copy of this software and associated documentation files (the "Software"),
c366016ffe1788c6847d0a967a954713725cab5evboxsync * to deal in the Software without restriction, including without limitation
c366016ffe1788c6847d0a967a954713725cab5evboxsync * the rights to use, copy, modify, merge, publish, distribute, sublicense,
c366016ffe1788c6847d0a967a954713725cab5evboxsync * and/or sell copies of the Software, and to permit persons to whom the
c366016ffe1788c6847d0a967a954713725cab5evboxsync * Software is furnished to do so, subject to the following conditions:
c366016ffe1788c6847d0a967a954713725cab5evboxsync *
c366016ffe1788c6847d0a967a954713725cab5evboxsync * The above copyright notice and this permission notice shall be included in
c366016ffe1788c6847d0a967a954713725cab5evboxsync * all copies or substantial portions of the Software.
c366016ffe1788c6847d0a967a954713725cab5evboxsync *
c366016ffe1788c6847d0a967a954713725cab5evboxsync * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
c366016ffe1788c6847d0a967a954713725cab5evboxsync * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
c366016ffe1788c6847d0a967a954713725cab5evboxsync * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
c366016ffe1788c6847d0a967a954713725cab5evboxsync * THE ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
c366016ffe1788c6847d0a967a954713725cab5evboxsync * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
c366016ffe1788c6847d0a967a954713725cab5evboxsync * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
c366016ffe1788c6847d0a967a954713725cab5evboxsync * DEALINGS IN THE SOFTWARE.
c366016ffe1788c6847d0a967a954713725cab5evboxsync *
c366016ffe1788c6847d0a967a954713725cab5evboxsync * Except as contained in this notice, the name(s) of the above copyright
c366016ffe1788c6847d0a967a954713725cab5evboxsync * holders shall not be used in advertising or otherwise to promote the sale,
c366016ffe1788c6847d0a967a954713725cab5evboxsync * use or other dealings in this Software without prior written authorization.
c366016ffe1788c6847d0a967a954713725cab5evboxsync */
81abf6f533300bfe7c2109e9db1029b7a0274598vboxsync
c366016ffe1788c6847d0a967a954713725cab5evboxsync#ifdef HAVE_DIX_CONFIG_H
c1b76913eb226361b0f57efd4dc45072db194218vboxsync#include <dix-config.h>
2f0d866e126dd288169fed591c259c1c6b4016e5vboxsync#endif
c366016ffe1788c6847d0a967a954713725cab5evboxsync
c366016ffe1788c6847d0a967a954713725cab5evboxsync#include <stdint.h>
c366016ffe1788c6847d0a967a954713725cab5evboxsync#ifndef _ROOTLESSCOMMON_H
c366016ffe1788c6847d0a967a954713725cab5evboxsync#define _ROOTLESSCOMMON_H
9c88dfe29cb5a5dcf70e84c706b9fc57bb309819vboxsync
c366016ffe1788c6847d0a967a954713725cab5evboxsync#include "misc.h"
c366016ffe1788c6847d0a967a954713725cab5evboxsync#include "rootless.h"
7eaf45ffccb9b2c2845da8b78f8dca01aa49382bvboxsync#include "fb.h"
c366016ffe1788c6847d0a967a954713725cab5evboxsync
c366016ffe1788c6847d0a967a954713725cab5evboxsync#include "scrnintstr.h"
c366016ffe1788c6847d0a967a954713725cab5evboxsync
7eaf45ffccb9b2c2845da8b78f8dca01aa49382bvboxsync#include "picturestr.h"
c366016ffe1788c6847d0a967a954713725cab5evboxsync
715e49c31b15c23c17a9ce3be42a75e7c48d4b78vboxsync// Debug output, or not.
c366016ffe1788c6847d0a967a954713725cab5evboxsync#ifdef ROOTLESSDEBUG
c366016ffe1788c6847d0a967a954713725cab5evboxsync#define RL_DEBUG_MSG ErrorF
c366016ffe1788c6847d0a967a954713725cab5evboxsync#else
4b42d28ec5f7347d82a7f7348629363b64036d9evboxsync#define RL_DEBUG_MSG(a, ...)
c366016ffe1788c6847d0a967a954713725cab5evboxsync#endif
c366016ffe1788c6847d0a967a954713725cab5evboxsync
c366016ffe1788c6847d0a967a954713725cab5evboxsync// Global variables
c366016ffe1788c6847d0a967a954713725cab5evboxsyncextern DevPrivateKeyRec rootlessGCPrivateKeyRec;
c366016ffe1788c6847d0a967a954713725cab5evboxsync
c366016ffe1788c6847d0a967a954713725cab5evboxsync#define rootlessGCPrivateKey (&rootlessGCPrivateKeyRec)
c366016ffe1788c6847d0a967a954713725cab5evboxsync
c366016ffe1788c6847d0a967a954713725cab5evboxsyncextern DevPrivateKeyRec rootlessScreenPrivateKeyRec;
c366016ffe1788c6847d0a967a954713725cab5evboxsync
c366016ffe1788c6847d0a967a954713725cab5evboxsync#define rootlessScreenPrivateKey (&rootlessScreenPrivateKeyRec)
c366016ffe1788c6847d0a967a954713725cab5evboxsync
c366016ffe1788c6847d0a967a954713725cab5evboxsyncextern DevPrivateKeyRec rootlessWindowPrivateKeyRec;
767f938b50ead294d8d6a020b915e079737ee6f8vboxsync
783c5efe04be621d9edbe07f2a41ea9a9a35cdcevboxsync#define rootlessWindowPrivateKey (&rootlessWindowPrivateKeyRec)
c366016ffe1788c6847d0a967a954713725cab5evboxsync
c366016ffe1788c6847d0a967a954713725cab5evboxsyncextern DevPrivateKeyRec rootlessWindowOldPixmapPrivateKeyRec;
c366016ffe1788c6847d0a967a954713725cab5evboxsync
c366016ffe1788c6847d0a967a954713725cab5evboxsync#define rootlessWindowOldPixmapPrivateKey (&rootlessWindowOldPixmapPrivateKeyRec)
c366016ffe1788c6847d0a967a954713725cab5evboxsync
c366016ffe1788c6847d0a967a954713725cab5evboxsync// RootlessGCRec: private per-gc data
c366016ffe1788c6847d0a967a954713725cab5evboxsynctypedef struct {
2d97f8baccdd684bc0a8a15eb86bbe9ff2b85374vboxsync GCFuncs *originalFuncs;
2858b9ad1bbe4ec6fed2ebb6497b8f712fa4740bvboxsync GCOps *originalOps;
c366016ffe1788c6847d0a967a954713725cab5evboxsync} RootlessGCRec;
c366016ffe1788c6847d0a967a954713725cab5evboxsync
c366016ffe1788c6847d0a967a954713725cab5evboxsync// RootlessScreenRec: per-screen private data
c366016ffe1788c6847d0a967a954713725cab5evboxsynctypedef struct _RootlessScreenRec {
c366016ffe1788c6847d0a967a954713725cab5evboxsync // Rootless implementation functions
c366016ffe1788c6847d0a967a954713725cab5evboxsync RootlessFrameProcsPtr imp;
c366016ffe1788c6847d0a967a954713725cab5evboxsync
c366016ffe1788c6847d0a967a954713725cab5evboxsync // Wrapped screen functions
715e49c31b15c23c17a9ce3be42a75e7c48d4b78vboxsync CreateScreenResourcesProcPtr CreateScreenResources;
870c45cce975c26ed5f57b2f9b22acd88614681bvboxsync CloseScreenProcPtr CloseScreen;
666f45fc17e2735f9abe111f0df0159e3eda2043vboxsync
666f45fc17e2735f9abe111f0df0159e3eda2043vboxsync CreateWindowProcPtr CreateWindow;
c366016ffe1788c6847d0a967a954713725cab5evboxsync DestroyWindowProcPtr DestroyWindow;
34281ca49352399191a51f929cc00801b370ee74vboxsync RealizeWindowProcPtr RealizeWindow;
9888fffcfbe2d41dce14a1249b12cb88cc9b149fvboxsync UnrealizeWindowProcPtr UnrealizeWindow;
34281ca49352399191a51f929cc00801b370ee74vboxsync MoveWindowProcPtr MoveWindow;
870c45cce975c26ed5f57b2f9b22acd88614681bvboxsync ResizeWindowProcPtr ResizeWindow;
c366016ffe1788c6847d0a967a954713725cab5evboxsync RestackWindowProcPtr RestackWindow;
c366016ffe1788c6847d0a967a954713725cab5evboxsync ReparentWindowProcPtr ReparentWindow;
c366016ffe1788c6847d0a967a954713725cab5evboxsync ChangeBorderWidthProcPtr ChangeBorderWidth;
86a00a5efe7fdc9725f2076050b996e205259cd6vboxsync PositionWindowProcPtr PositionWindow;
c366016ffe1788c6847d0a967a954713725cab5evboxsync ChangeWindowAttributesProcPtr ChangeWindowAttributes;
a4b6bc5445b0e3d9bda9db76ac953b2542fd0a28vboxsync
c366016ffe1788c6847d0a967a954713725cab5evboxsync CreateGCProcPtr CreateGC;
c366016ffe1788c6847d0a967a954713725cab5evboxsync CopyWindowProcPtr CopyWindow;
c366016ffe1788c6847d0a967a954713725cab5evboxsync GetImageProcPtr GetImage;
c366016ffe1788c6847d0a967a954713725cab5evboxsync SourceValidateProcPtr SourceValidate;
c366016ffe1788c6847d0a967a954713725cab5evboxsync
c366016ffe1788c6847d0a967a954713725cab5evboxsync MarkOverlappedWindowsProcPtr MarkOverlappedWindows;
c366016ffe1788c6847d0a967a954713725cab5evboxsync ValidateTreeProcPtr ValidateTree;
c366016ffe1788c6847d0a967a954713725cab5evboxsync
a7aa94e0115a73841f34ebbfa00f63fa1904e51fvboxsync SetShapeProcPtr SetShape;
b6cc138b99f86c2d29ecfe32cecf9f68ba5e73afvboxsync
0e5731ab59b4ecead38375f26eeea698f00b19fdvboxsync CompositeProcPtr Composite;
0e5731ab59b4ecead38375f26eeea698f00b19fdvboxsync GlyphsProcPtr Glyphs;
0e5731ab59b4ecead38375f26eeea698f00b19fdvboxsync
a7aa94e0115a73841f34ebbfa00f63fa1904e51fvboxsync InstallColormapProcPtr InstallColormap;
a7aa94e0115a73841f34ebbfa00f63fa1904e51fvboxsync UninstallColormapProcPtr UninstallColormap;
a7aa94e0115a73841f34ebbfa00f63fa1904e51fvboxsync StoreColorsProcPtr StoreColors;
c366016ffe1788c6847d0a967a954713725cab5evboxsync
c366016ffe1788c6847d0a967a954713725cab5evboxsync void *pixmap_data;
c366016ffe1788c6847d0a967a954713725cab5evboxsync unsigned int pixmap_data_size;
c366016ffe1788c6847d0a967a954713725cab5evboxsync
5979821e2c16d1fcec5b9a3ef64e13246fc9a93avboxsync ColormapPtr colormap;
c366016ffe1788c6847d0a967a954713725cab5evboxsync
e66c95fa9950a4d9c567db63a4a495bf086cc4bfvboxsync void *redisplay_timer;
76326dd9df821e926bfda3ca9193f7736b42f6fdvboxsync unsigned int redisplay_timer_set:1;
5979821e2c16d1fcec5b9a3ef64e13246fc9a93avboxsync unsigned int redisplay_queued:1;
76326dd9df821e926bfda3ca9193f7736b42f6fdvboxsync unsigned int redisplay_expired:1;
9d869ecad3ee96dd3f059f34a8f285fc3d361ab8vboxsync unsigned int colormap_changed:1;
c366016ffe1788c6847d0a967a954713725cab5evboxsync} RootlessScreenRec, *RootlessScreenPtr;
c366016ffe1788c6847d0a967a954713725cab5evboxsync
c366016ffe1788c6847d0a967a954713725cab5evboxsync// "Definition of the Porting Layer for the X11 Sample Server" says
c366016ffe1788c6847d0a967a954713725cab5evboxsync// unwrap and rewrap of screen functions is unnecessary, but
c366016ffe1788c6847d0a967a954713725cab5evboxsync// screen->CreateGC changes after a call to cfbCreateGC.
c366016ffe1788c6847d0a967a954713725cab5evboxsync
81abf6f533300bfe7c2109e9db1029b7a0274598vboxsync#define SCREEN_UNWRAP(screen, fn) \
c366016ffe1788c6847d0a967a954713725cab5evboxsync screen->fn = SCREENREC(screen)->fn;
c366016ffe1788c6847d0a967a954713725cab5evboxsync
c366016ffe1788c6847d0a967a954713725cab5evboxsync#define SCREEN_WRAP(screen, fn) \
c366016ffe1788c6847d0a967a954713725cab5evboxsync SCREENREC(screen)->fn = screen->fn; \
c366016ffe1788c6847d0a967a954713725cab5evboxsync screen->fn = Rootless##fn
c366016ffe1788c6847d0a967a954713725cab5evboxsync
9c88dfe29cb5a5dcf70e84c706b9fc57bb309819vboxsync// Accessors for screen and window privates
c366016ffe1788c6847d0a967a954713725cab5evboxsync
c366016ffe1788c6847d0a967a954713725cab5evboxsync#define SCREENREC(pScreen) ((RootlessScreenRec *) \
c366016ffe1788c6847d0a967a954713725cab5evboxsync dixLookupPrivate(&(pScreen)->devPrivates, rootlessScreenPrivateKey))
c366016ffe1788c6847d0a967a954713725cab5evboxsync
c366016ffe1788c6847d0a967a954713725cab5evboxsync#define SETSCREENREC(pScreen, v) \
c366016ffe1788c6847d0a967a954713725cab5evboxsync dixSetPrivate(&(pScreen)->devPrivates, rootlessScreenPrivateKey, v)
c366016ffe1788c6847d0a967a954713725cab5evboxsync
a4b6bc5445b0e3d9bda9db76ac953b2542fd0a28vboxsync#define WINREC(pWin) ((RootlessWindowRec *) \
0e5731ab59b4ecead38375f26eeea698f00b19fdvboxsync dixLookupPrivate(&(pWin)->devPrivates, rootlessWindowPrivateKey))
c366016ffe1788c6847d0a967a954713725cab5evboxsync
c366016ffe1788c6847d0a967a954713725cab5evboxsync#define SETWINREC(pWin, v) \
a2b66e2b8b92cf2d0706078798036035cb9fa94dvboxsync dixSetPrivate(&(pWin)->devPrivates, rootlessWindowPrivateKey, v)
c366016ffe1788c6847d0a967a954713725cab5evboxsync
c366016ffe1788c6847d0a967a954713725cab5evboxsync// Call a rootless implementation function.
c366016ffe1788c6847d0a967a954713725cab5evboxsync// Many rootless implementation functions are allowed to be NULL.
c366016ffe1788c6847d0a967a954713725cab5evboxsync#define CallFrameProc(pScreen, proc, params) \
c366016ffe1788c6847d0a967a954713725cab5evboxsync if (SCREENREC(pScreen)->frameProcs.proc) { \
c366016ffe1788c6847d0a967a954713725cab5evboxsync RL_DEBUG_MSG("calling frame proc " #proc " "); \
c366016ffe1788c6847d0a967a954713725cab5evboxsync SCREENREC(pScreen)->frameProcs.proc params; \
a4b6bc5445b0e3d9bda9db76ac953b2542fd0a28vboxsync }
c366016ffe1788c6847d0a967a954713725cab5evboxsync
c366016ffe1788c6847d0a967a954713725cab5evboxsync// BoxRec manipulators
c366016ffe1788c6847d0a967a954713725cab5evboxsync// Copied from shadowfb
c366016ffe1788c6847d0a967a954713725cab5evboxsync
c366016ffe1788c6847d0a967a954713725cab5evboxsync#define TRIM_BOX(box, pGC) { \
c366016ffe1788c6847d0a967a954713725cab5evboxsync BoxPtr extents = &pGC->pCompositeClip->extents;\
c366016ffe1788c6847d0a967a954713725cab5evboxsync if(box.x1 < extents->x1) box.x1 = extents->x1; \
9837b5326a44772e824a15f2d5d937ddfd627d54vboxsync if(box.x2 > extents->x2) box.x2 = extents->x2; \
9837b5326a44772e824a15f2d5d937ddfd627d54vboxsync if(box.y1 < extents->y1) box.y1 = extents->y1; \
9837b5326a44772e824a15f2d5d937ddfd627d54vboxsync if(box.y2 > extents->y2) box.y2 = extents->y2; \
9837b5326a44772e824a15f2d5d937ddfd627d54vboxsync}
c366016ffe1788c6847d0a967a954713725cab5evboxsync
0cde281779e97ead3181bbd3b628451fa2b1efe1vboxsync#define TRANSLATE_BOX(box, pDraw) { \
b3b6e2e7ee4482a4818dbed60d9795fd80baed33vboxsync box.x1 += pDraw->x; \
ab455939477d81b7bb500586f88029d3a3c0b34cvboxsync box.x2 += pDraw->x; \
c366016ffe1788c6847d0a967a954713725cab5evboxsync box.y1 += pDraw->y; \
cd7a8c034836a94a0c4f0adf9764f9ed661cdd01vboxsync box.y2 += pDraw->y; \
ab455939477d81b7bb500586f88029d3a3c0b34cvboxsync}
c366016ffe1788c6847d0a967a954713725cab5evboxsync
c366016ffe1788c6847d0a967a954713725cab5evboxsync#define TRIM_AND_TRANSLATE_BOX(box, pDraw, pGC) { \
c366016ffe1788c6847d0a967a954713725cab5evboxsync TRANSLATE_BOX(box, pDraw); \
c366016ffe1788c6847d0a967a954713725cab5evboxsync TRIM_BOX(box, pGC); \
c366016ffe1788c6847d0a967a954713725cab5evboxsync}
c366016ffe1788c6847d0a967a954713725cab5evboxsync
c366016ffe1788c6847d0a967a954713725cab5evboxsync#define BOX_NOT_EMPTY(box) \
c366016ffe1788c6847d0a967a954713725cab5evboxsync (((box.x2 - box.x1) > 0) && ((box.y2 - box.y1) > 0))
c366016ffe1788c6847d0a967a954713725cab5evboxsync
c366016ffe1788c6847d0a967a954713725cab5evboxsync// HUGE_ROOT and NORMAL_ROOT
c366016ffe1788c6847d0a967a954713725cab5evboxsync// We don't want to clip windows to the edge of the screen.
c366016ffe1788c6847d0a967a954713725cab5evboxsync// HUGE_ROOT temporarily makes the root window really big.
c366016ffe1788c6847d0a967a954713725cab5evboxsync// This is needed as a wrapper around any function that calls
c366016ffe1788c6847d0a967a954713725cab5evboxsync// SetWinSize or SetBorderSize which clip a window against its
c366016ffe1788c6847d0a967a954713725cab5evboxsync// parents, including the root.
c366016ffe1788c6847d0a967a954713725cab5evboxsync
c936b605260fac01308e3f63b869f401321c52b3vboxsyncextern RegionRec rootlessHugeRoot;
c366016ffe1788c6847d0a967a954713725cab5evboxsync
c366016ffe1788c6847d0a967a954713725cab5evboxsync#define HUGE_ROOT(pWin) \
c366016ffe1788c6847d0a967a954713725cab5evboxsync do { \
c366016ffe1788c6847d0a967a954713725cab5evboxsync WindowPtr w = pWin; \
c366016ffe1788c6847d0a967a954713725cab5evboxsync while (w->parent) \
9837b5326a44772e824a15f2d5d937ddfd627d54vboxsync w = w->parent; \
c366016ffe1788c6847d0a967a954713725cab5evboxsync saveRoot = w->winSize; \
c366016ffe1788c6847d0a967a954713725cab5evboxsync w->winSize = rootlessHugeRoot; \
1d42c7799e7c35c5b36a2494cde9a47e5651ceadvboxsync } while (0)
c366016ffe1788c6847d0a967a954713725cab5evboxsync
c366016ffe1788c6847d0a967a954713725cab5evboxsync#define NORMAL_ROOT(pWin) \
c366016ffe1788c6847d0a967a954713725cab5evboxsync do { \
c366016ffe1788c6847d0a967a954713725cab5evboxsync WindowPtr w = pWin; \
81abf6f533300bfe7c2109e9db1029b7a0274598vboxsync while (w->parent) \
c366016ffe1788c6847d0a967a954713725cab5evboxsync w = w->parent; \
c366016ffe1788c6847d0a967a954713725cab5evboxsync w->winSize = saveRoot; \
c366016ffe1788c6847d0a967a954713725cab5evboxsync } while (0)
c366016ffe1788c6847d0a967a954713725cab5evboxsync
// Returns TRUE if this window is a top-level window (i.e. child of the root)
// The root is not a top-level window.
#define IsTopLevel(pWin) \
((pWin) && (pWin)->parent && !(pWin)->parent->parent)
// Returns TRUE if this window is a root window
#define IsRoot(pWin) \
((pWin) == (pWin)->drawable.pScreen->root)
/*
* SetPixmapBaseToScreen
* Move the given pixmap's base address to where pixel (0, 0)
* would be if the pixmap's actual data started at (x, y).
* Can't access the bits before the first word of the drawable's data in
* rootless mode, so make sure our base address is always 32-bit aligned.
*/
#define SetPixmapBaseToScreen(pix, _x, _y) { \
PixmapPtr _pPix = (PixmapPtr) (pix); \
_pPix->devPrivate.ptr = (char *) (_pPix->devPrivate.ptr) - \
((int)(_x) * _pPix->drawable.bitsPerPixel/8 + \
(int)(_y) * _pPix->devKind); \
if (_pPix->drawable.bitsPerPixel != FB_UNIT) { \
size_t _diff = ((size_t) _pPix->devPrivate.ptr) & \
(FB_UNIT / CHAR_BIT - 1); \
_pPix->devPrivate.ptr = (char *) (_pPix->devPrivate.ptr) - \
_diff; \
_pPix->drawable.x = _diff / \
(_pPix->drawable.bitsPerPixel / CHAR_BIT); \
} \
}
// Returns TRUE if this window is visible inside a frame
// (e.g. it is visible and has a top-level or root parent)
Bool IsFramedWindow(WindowPtr pWin);
// Routines that cause regions to get redrawn.
// DamageRegion and DamageRect are in global coordinates.
// DamageBox is in window-local coordinates.
void RootlessDamageRegion(WindowPtr pWindow, RegionPtr pRegion);
void RootlessDamageRect(WindowPtr pWindow, int x, int y, int w, int h);
void RootlessDamageBox(WindowPtr pWindow, BoxPtr pBox);
void RootlessRedisplay(WindowPtr pWindow);
void RootlessRedisplayScreen(ScreenPtr pScreen);
void RootlessQueueRedisplay(ScreenPtr pScreen);
/* Return the colormap currently installed on the given screen. */
ColormapPtr RootlessGetColormap(ScreenPtr pScreen);
/* Convert colormap to ARGB. */
Bool RootlessResolveColormap(ScreenPtr pScreen, int first_color,
int n_colors, uint32_t * colors);
void RootlessFlushWindowColormap(WindowPtr pWin);
void RootlessFlushScreenColormaps(ScreenPtr pScreen);
// Move a window to its proper location on the screen.
void RootlessRepositionWindow(WindowPtr pWin);
// Move the window to it's correct place in the physical stacking order.
void RootlessReorderWindow(WindowPtr pWin);
void RootlessScreenExpose(ScreenPtr pScreen);
void RootlessHideAllWindows(void);
void RootlessShowAllWindows(void);
void RootlessUpdateRooted(Bool state);
void RootlessEnableRoot(ScreenPtr pScreen);
void RootlessDisableRoot(ScreenPtr pScreen);
void RootlessSetPixmapOfAncestors(WindowPtr pWin);
#endif /* _ROOTLESSCOMMON_H */