diff options
author | Eamon Walsh <ewalsh@tycho.nsa.gov> | 2007-12-13 18:38:25 -0500 |
---|---|---|
committer | Eamon Walsh <ewalsh@moss-charon.epoch.ncsc.mil> | 2007-12-13 18:38:25 -0500 |
commit | c8feb73f5841e7812d8dfdb91f1064e2033d028c (patch) | |
tree | 4f176f28ec27a4e5bfb9c671e569838741b6bfbd /miext/rootless/rootlessWindow.c | |
parent | 9a7ce573636e349ee2967991c7cc1407e80ae524 (diff) | |
parent | a125ce4a84f5fb5934fefebd7cfb22a83180874d (diff) |
Merge branch 'master' into XACE-SELINUX
Conflicts:
Xext/EVI.c
Xext/bigreq.c
Xext/cup.c
Xext/dpms.c
Xext/fontcache.c
Xext/mitmisc.c
Xext/xcmisc.c
Xext/xf86bigfont.c
Xext/xtest.c
configure.ac
dbe/dbe.c
hw/darwin/darwin.h
hw/darwin/darwinEvents.c
hw/darwin/iokit/xfIOKit.h
hw/darwin/iokit/xfIOKitCursor.c
hw/darwin/quartz/fullscreen/fullscreen.c
hw/darwin/quartz/fullscreen/quartzCursor.c
hw/darwin/quartz/quartz.c
hw/darwin/quartz/quartzCommon.h
hw/darwin/quartz/quartzCursor.c
hw/darwin/quartz/xpr/dri.c
hw/darwin/quartz/xpr/dristruct.h
hw/darwin/quartz/xpr/xprCursor.c
hw/darwin/quartz/xpr/xprFrame.c
hw/xfree86/modes/xf86RandR12.c
include/cursor.h
miext/rootless/rootlessCommon.h
miext/rootless/rootlessScreen.c
miext/rootless/rootlessWindow.c
render/picturestr.h
Trying to pick up the pieces from the darwin churn here...
Diffstat (limited to 'miext/rootless/rootlessWindow.c')
-rw-r--r-- | miext/rootless/rootlessWindow.c | 58 |
1 files changed, 44 insertions, 14 deletions
diff --git a/miext/rootless/rootlessWindow.c b/miext/rootless/rootlessWindow.c index 16cbb18af..b95339888 100644 --- a/miext/rootless/rootlessWindow.c +++ b/miext/rootless/rootlessWindow.c @@ -198,6 +198,7 @@ RootlessCreateWindow(WindowPtr pWin) RegionRec saveRoot; SETWINREC(pWin, NULL); + dixSetPrivate(&pWin->devPrivates, rootlessWindowOldPixmapPrivateKey, NULL); SCREEN_UNWRAP(pWin->drawable.pScreen, CreateWindow); @@ -445,6 +446,12 @@ RootlessInitializeFrame(WindowPtr pWin, RootlessWindowRec *winRec) } +Bool +RootlessColormapCallback (void *data, int first_color, int n_colors, uint32_t *colors) +{ + return RootlessResolveColormap (data, first_color, n_colors, colors); +} + /* * RootlessEnsureFrame * Make sure the given window is framed. If the window doesn't have a @@ -503,6 +510,9 @@ RootlessEnsureFrame(WindowPtr pWin) return NULL; } + if (pWin->drawable.depth == 8) + RootlessFlushWindowColormap(pWin); + #ifdef SHAPE if (pShape != NULL) REGION_UNINIT(pScreen, &shape); @@ -1455,6 +1465,26 @@ out: } } + +void +RootlessFlushWindowColormap (WindowPtr pWin) +{ + RootlessWindowRec *winRec = WINREC (pWin); + xp_window_changes wc; + + if (winRec == NULL) + return; + + RootlessStopDrawing (pWin, FALSE); + + /* This is how we tell xp that the colormap may have changed. */ + + wc.colormap = RootlessColormapCallback; + wc.colormap_data = pWin->drawable.pScreen; + + configure_window (winRec->wid, XP_COLORMAP, &wc); +} + /* * RootlessChangeBorderWidth * FIXME: untested! @@ -1516,20 +1546,20 @@ RootlessChangeBorderWidth(WindowPtr pWin, unsigned int width) void RootlessOrderAllWindows (void) { - int i; - WindowPtr pWin; - - RL_DEBUG_MSG("RootlessOrderAllWindows() "); - for (i = 0; i < screenInfo.numScreens; i++) { - if (screenInfo.screens[i] == NULL) continue; - pWin = WindowTable[i]; - if (pWin == NULL) continue; + int i; + WindowPtr pWin; + + RL_DEBUG_MSG("RootlessOrderAllWindows() "); + for (i = 0; i < screenInfo.numScreens; i++) { + if (screenInfo.screens[i] == NULL) continue; + pWin = WindowTable[i]; + if (pWin == NULL) continue; - for (pWin = pWin->firstChild; pWin != NULL; pWin = pWin->nextSib) { - if (!pWin->realized) continue; - if (RootlessEnsureFrame(pWin) == NULL) continue; - RootlessReorderWindow (pWin); + for (pWin = pWin->firstChild; pWin != NULL; pWin = pWin->nextSib) { + if (!pWin->realized) continue; + if (RootlessEnsureFrame(pWin) == NULL) continue; + RootlessReorderWindow (pWin); + } } - } - RL_DEBUG_MSG("RootlessOrderAllWindows() done"); + RL_DEBUG_MSG("RootlessOrderAllWindows() done"); } |