aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/dix/colormap.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-07-10 14:56:29 +0200
committermarha <marha@users.sourceforge.net>2012-07-10 14:56:29 +0200
commitd137057fd13e83ec15ab416c7fe774741da06047 (patch)
treef4b38caa4f3ecb983f00e84f4f4d8d66699ecbc5 /xorg-server/dix/colormap.c
parentc29d91cfd8df084f16d0d2dfa82c3a86f7719a73 (diff)
downloadvcxsrv-d137057fd13e83ec15ab416c7fe774741da06047.tar.gz
vcxsrv-d137057fd13e83ec15ab416c7fe774741da06047.tar.bz2
vcxsrv-d137057fd13e83ec15ab416c7fe774741da06047.zip
fontconfig mesa xserver git update 10 Jul 2012
Diffstat (limited to 'xorg-server/dix/colormap.c')
-rw-r--r--xorg-server/dix/colormap.c40
1 files changed, 21 insertions, 19 deletions
diff --git a/xorg-server/dix/colormap.c b/xorg-server/dix/colormap.c
index 10306285e..a43e2791b 100644
--- a/xorg-server/dix/colormap.c
+++ b/xorg-server/dix/colormap.c
@@ -450,15 +450,15 @@ FreeColormap(pointer value, XID mid)
static int
TellNoMap(WindowPtr pwin, Colormap * pmid)
{
- xEvent xE;
-
if (wColormap(pwin) == *pmid) {
/* This should be call to DeliverEvent */
+ xEvent xE = {
+ .u.colormap.window = pwin->drawable.id,
+ .u.colormap.colormap = None,
+ .u.colormap.new = TRUE,
+ .u.colormap.state = ColormapUninstalled
+ };
xE.u.u.type = ColormapNotify;
- xE.u.colormap.window = pwin->drawable.id;
- xE.u.colormap.colormap = None;
- xE.u.colormap.new = TRUE;
- xE.u.colormap.state = ColormapUninstalled;
#ifdef PANORAMIX
if (noPanoramiXExtension || !pwin->drawable.pScreen->myNum)
#endif
@@ -477,7 +477,6 @@ int
TellLostMap(WindowPtr pwin, pointer value)
{
Colormap *pmid = (Colormap *) value;
- xEvent xE;
#ifdef PANORAMIX
if (!noPanoramiXExtension && pwin->drawable.pScreen->myNum)
@@ -485,11 +484,13 @@ TellLostMap(WindowPtr pwin, pointer value)
#endif
if (wColormap(pwin) == *pmid) {
/* This should be call to DeliverEvent */
+ xEvent xE = {
+ .u.colormap.window = pwin->drawable.id,
+ .u.colormap.colormap = *pmid,
+ .u.colormap.new = FALSE,
+ .u.colormap.state = ColormapUninstalled
+ };
xE.u.u.type = ColormapNotify;
- xE.u.colormap.window = pwin->drawable.id;
- xE.u.colormap.colormap = *pmid;
- xE.u.colormap.new = FALSE;
- xE.u.colormap.state = ColormapUninstalled;
DeliverEvents(pwin, &xE, 1, (WindowPtr) NULL);
}
@@ -501,7 +502,6 @@ int
TellGainedMap(WindowPtr pwin, pointer value)
{
Colormap *pmid = (Colormap *) value;
- xEvent xE;
#ifdef PANORAMIX
if (!noPanoramiXExtension && pwin->drawable.pScreen->myNum)
@@ -509,11 +509,13 @@ TellGainedMap(WindowPtr pwin, pointer value)
#endif
if (wColormap(pwin) == *pmid) {
/* This should be call to DeliverEvent */
+ xEvent xE = {
+ .u.colormap.window = pwin->drawable.id,
+ .u.colormap.colormap = *pmid,
+ .u.colormap.new = FALSE,
+ .u.colormap.state = ColormapInstalled
+ };
xE.u.u.type = ColormapNotify;
- xE.u.colormap.window = pwin->drawable.id;
- xE.u.colormap.colormap = *pmid;
- xE.u.colormap.new = FALSE;
- xE.u.colormap.state = ColormapInstalled;
DeliverEvents(pwin, &xE, 1, (WindowPtr) NULL);
}
@@ -576,7 +578,7 @@ CopyFree(int channel, int client, ColormapPtr pmapSrc, ColormapPtr pmapDst)
int nalloc;
switch (channel) {
- default: /* so compiler can see that everything gets initialized */
+ default: /* so compiler can see that everything gets initialized */
case REDMAP:
ppix = (pmapSrc->clientPixelsRed)[client];
npix = (pmapSrc->numPixelsRed)[client];
@@ -653,7 +655,7 @@ FreeCell(ColormapPtr pmap, Pixel i, int channel)
int *pCount;
switch (channel) {
- default: /* so compiler can see that everything gets initialized */
+ default: /* so compiler can see that everything gets initialized */
case PSEUDOMAP:
case REDMAP:
pent = (EntryPtr) & pmap->red[i];
@@ -2146,7 +2148,7 @@ FreeCo(ColormapPtr pmap, int client, int color, int npixIn, Pixel * ppixIn,
ppixClient = pmap->clientPixelsBlue[client];
npixClient = pmap->numPixelsBlue[client];
break;
- default: /* so compiler can see that everything gets initialized */
+ default: /* so compiler can see that everything gets initialized */
case PSEUDOMAP:
cmask = ~((Pixel) 0);
rgbbad = 0;