aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/mi
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2010-05-05 09:43:03 +0000
committermarha <marha@users.sourceforge.net>2010-05-05 09:43:03 +0000
commit0874ae23a16946781dd517cfdb011c691ad0b581 (patch)
tree8de31864935e96a5e59b9fe6ceb12390bbc474cd /xorg-server/mi
parentd059ebdcb012228102f0b64f8cddf9464d5b625a (diff)
downloadvcxsrv-0874ae23a16946781dd517cfdb011c691ad0b581.tar.gz
vcxsrv-0874ae23a16946781dd517cfdb011c691ad0b581.tar.bz2
vcxsrv-0874ae23a16946781dd517cfdb011c691ad0b581.zip
svn merge -r571:HEAD "^/branches/released" .
Diffstat (limited to 'xorg-server/mi')
-rw-r--r--xorg-server/mi/micmap.c15
-rw-r--r--xorg-server/mi/micmap.h8
-rw-r--r--xorg-server/mi/miexpose.c3
3 files changed, 17 insertions, 9 deletions
diff --git a/xorg-server/mi/micmap.c b/xorg-server/mi/micmap.c
index 5a1e60a16..38efb3ac9 100644
--- a/xorg-server/mi/micmap.c
+++ b/xorg-server/mi/micmap.c
@@ -40,13 +40,14 @@
#include "globals.h"
#include "micmap.h"
-ColormapPtr miInstalledMaps[MAXSCREENS];
+static int micmapScrPrivateKeyIndex;
+DevPrivateKey micmapScrPrivateKey = &micmapScrPrivateKeyIndex;
int
miListInstalledColormaps(ScreenPtr pScreen, Colormap *pmaps)
{
- if (miInstalledMaps[pScreen->myNum]) {
- *pmaps = miInstalledMaps[pScreen->myNum]->mid;
+ if (GetInstalledmiColormap(pScreen)) {
+ *pmaps = GetInstalledmiColormap(pScreen)->mid;
return (1);
}
return 0;
@@ -55,8 +56,7 @@ miListInstalledColormaps(ScreenPtr pScreen, Colormap *pmaps)
void
miInstallColormap(ColormapPtr pmap)
{
- int index = pmap->pScreen->myNum;
- ColormapPtr oldpmap = miInstalledMaps[index];
+ ColormapPtr oldpmap = GetInstalledmiColormap(pmap->pScreen);
if(pmap != oldpmap)
{
@@ -65,7 +65,7 @@ miInstallColormap(ColormapPtr pmap)
if(oldpmap != (ColormapPtr)None)
WalkTree(pmap->pScreen, TellLostMap, (char *)&oldpmap->mid);
/* Install pmap */
- miInstalledMaps[index] = pmap;
+ SetInstalledmiColormap(pmap->pScreen, pmap);
WalkTree(pmap->pScreen, TellGainedMap, (char *)&pmap->mid);
}
@@ -74,8 +74,7 @@ miInstallColormap(ColormapPtr pmap)
void
miUninstallColormap(ColormapPtr pmap)
{
- int index = pmap->pScreen->myNum;
- ColormapPtr curpmap = miInstalledMaps[index];
+ ColormapPtr curpmap = GetInstalledmiColormap(pmap->pScreen);
if(pmap == curpmap)
{
diff --git a/xorg-server/mi/micmap.h b/xorg-server/mi/micmap.h
index 5c8448a95..8ad94b9dd 100644
--- a/xorg-server/mi/micmap.h
+++ b/xorg-server/mi/micmap.h
@@ -4,7 +4,13 @@
#ifndef _MICMAP_H_
#define _MICMAP_H_
-extern _X_EXPORT ColormapPtr miInstalledMaps[MAXSCREENS];
+#define GetInstalledmiColormap(s) \
+ ((ColormapPtr) dixLookupPrivate(&(s)->devPrivates, micmapScrPrivateKey))
+#define SetInstalledmiColormap(s,c) \
+ (dixSetPrivate(&(s)->devPrivates, micmapScrPrivateKey, c))
+
+extern _X_EXPORT DevPrivateKey micmapScrPrivateKey;
+
typedef Bool (* miInitVisualsProcPtr)(VisualPtr *, DepthPtr *, int *, int *,
int *, VisualID *, unsigned long, int,
diff --git a/xorg-server/mi/miexpose.c b/xorg-server/mi/miexpose.c
index 1c9c3a436..f52b49211 100644
--- a/xorg-server/mi/miexpose.c
+++ b/xorg-server/mi/miexpose.c
@@ -552,6 +552,9 @@ miPaintWindow(WindowPtr pWin, RegionPtr prgn, int what)
DrawablePtr drawable = &pWin->drawable;
#ifdef ROOTLESS
+ if(!drawable || drawable->type == UNDRAWABLE_WINDOW)
+ return;
+
if(IsFramedWindow(pWin)) {
RootlessStartDrawing(pWin);
RootlessDamageRegion(pWin, prgn);