aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/xfixes
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2010-05-20 15:26:41 +0000
committermarha <marha@users.sourceforge.net>2010-05-20 15:26:41 +0000
commitf5fb2d27f1fd4976f0e77d97461a5e57ba6c9a23 (patch)
treec76e9cb708483e65b114c08ed008880f478cae15 /xorg-server/xfixes
parentb16c0295c9f95426980d567e93ae00c52545b3fa (diff)
parent3319741e6f9fc3232eb40462a261271b9af2dcb2 (diff)
downloadvcxsrv-f5fb2d27f1fd4976f0e77d97461a5e57ba6c9a23.tar.gz
vcxsrv-f5fb2d27f1fd4976f0e77d97461a5e57ba6c9a23.tar.bz2
vcxsrv-f5fb2d27f1fd4976f0e77d97461a5e57ba6c9a23.zip
svn merge "^/branches/released" .
Diffstat (limited to 'xorg-server/xfixes')
-rw-r--r--xorg-server/xfixes/cursor.c13
-rw-r--r--xorg-server/xfixes/region.c6
-rw-r--r--xorg-server/xfixes/select.c4
-rw-r--r--xorg-server/xfixes/xfixes.c1
-rw-r--r--xorg-server/xfixes/xfixes.h113
5 files changed, 64 insertions, 73 deletions
diff --git a/xorg-server/xfixes/cursor.c b/xorg-server/xfixes/cursor.c
index 0d7213a48..5f0fe9c88 100644
--- a/xorg-server/xfixes/cursor.c
+++ b/xorg-server/xfixes/cursor.c
@@ -72,10 +72,7 @@ static void deleteCursorHideCountsForScreen (ScreenPtr pScreen);
int err; \
err = dixLookupResourceByType((pointer *) &pCursor, cursor, \
RT_CURSOR, client, access); \
- if (err == BadValue) { \
- client->errorValue = cursor; \
- return BadCursor; \
- } else if (err != Success) { \
+ if (err != Success) { \
client->errorValue = cursor; \
return err; \
} \
@@ -166,13 +163,11 @@ CursorDisplayCursor (DeviceIntPtr pDev,
CursorCurrent[pDev->id] = pCursor;
for (e = cursorEvents; e; e = e->next)
{
- if ((e->eventMask & XFixesDisplayCursorNotifyMask) &&
- !e->pClient->clientGone)
+ if ((e->eventMask & XFixesDisplayCursorNotifyMask))
{
xXFixesCursorNotifyEvent ev;
ev.type = XFixesEventBase + XFixesCursorNotify;
ev.subtype = XFixesDisplayCursorNotify;
- ev.sequenceNumber = e->pClient->sequence;
ev.window = e->pWindow->drawable.id;
ev.cursorSerial = pCursor->serialNumber;
ev.timestamp = currentTime.milliseconds;
@@ -886,7 +881,7 @@ ProcXFixesHideCursor (ClientPtr client)
client, DixGetAttrAccess);
if (ret != Success) {
client->errorValue = stuff->window;
- return (ret == BadValue) ? BadWindow : ret;
+ return ret;
}
/*
@@ -949,7 +944,7 @@ ProcXFixesShowCursor (ClientPtr client)
client, DixGetAttrAccess);
if (rc != Success) {
client->errorValue = stuff->window;
- return (rc == BadValue) ? BadWindow : rc;
+ return rc;
}
/*
diff --git a/xorg-server/xfixes/region.c b/xorg-server/xfixes/region.c
index 2276ab8b6..7b1c40b15 100644
--- a/xorg-server/xfixes/region.c
+++ b/xorg-server/xfixes/region.c
@@ -119,7 +119,7 @@ ProcXFixesCreateRegionFromBitmap (ClientPtr client)
if (rc != Success)
{
client->errorValue = stuff->bitmap;
- return (rc == BadValue) ? BadPixmap : rc;
+ return rc;
}
if (pPixmap->drawable.depth != 1)
return BadMatch;
@@ -164,7 +164,7 @@ ProcXFixesCreateRegionFromWindow (ClientPtr client)
if (rc != Success)
{
client->errorValue = stuff->window;
- return (rc == BadValue) ? BadWindow : rc;
+ return rc;
}
switch (stuff->kind) {
case WindowRegionBounding:
@@ -675,7 +675,7 @@ ProcXFixesSetWindowShapeRegion (ClientPtr client)
if (rc != Success)
{
client->errorValue = stuff->dest;
- return (rc == BadValue) ? BadWindow : rc;
+ return rc;
}
VERIFY_REGION_OR_NONE(pRegion, stuff->region, client, DixWriteAccess);
pScreen = pWin->drawable.pScreen;
diff --git a/xorg-server/xfixes/select.c b/xorg-server/xfixes/select.c
index 044294ee1..00b693f9d 100644
--- a/xorg-server/xfixes/select.c
+++ b/xorg-server/xfixes/select.c
@@ -78,15 +78,13 @@ XFixesSelectionCallback (CallbackListPtr *callbacks, pointer data, pointer args)
for (e = selectionEvents; e; e = e->next)
{
if (e->selection == selection->selection &&
- (e->eventMask & eventMask) &&
- !e->pClient->clientGone)
+ (e->eventMask & eventMask))
{
xXFixesSelectionNotifyEvent ev;
memset(&ev, 0, sizeof(xXFixesSelectionNotifyEvent));
ev.type = XFixesEventBase + XFixesSelectionNotify;
ev.subtype = subtype;
- ev.sequenceNumber = e->pClient->sequence;
ev.window = e->pWindow->drawable.id;
if (subtype == XFixesSetSelectionOwnerNotify)
ev.owner = selection->window;
diff --git a/xorg-server/xfixes/xfixes.c b/xorg-server/xfixes/xfixes.c
index fd23a5cb7..36eda56a5 100644
--- a/xorg-server/xfixes/xfixes.c
+++ b/xorg-server/xfixes/xfixes.c
@@ -259,5 +259,6 @@ XFixesExtensionInit(void)
(EventSwapPtr) SXFixesSelectionNotifyEvent;
EventSwapVector[XFixesEventBase + XFixesCursorNotify] =
(EventSwapPtr) SXFixesCursorNotifyEvent;
+ SetResourceTypeErrorValue(RegionResType, XFixesErrorBase + BadRegion);
}
}
diff --git a/xorg-server/xfixes/xfixes.h b/xorg-server/xfixes/xfixes.h
index 69d162ffe..f834305bf 100644
--- a/xorg-server/xfixes/xfixes.h
+++ b/xorg-server/xfixes/xfixes.h
@@ -1,58 +1,55 @@
-/*
- * Copyright © 2002 Keith Packard
- *
- * Permission to use, copy, modify, distribute, and sell this software and its
- * documentation for any purpose is hereby granted without fee, provided that
- * the above copyright notice appear in all copies and that both that
- * copyright notice and this permission notice appear in supporting
- * documentation, and that the name of Keith Packard not be used in
- * advertising or publicity pertaining to distribution of the software without
- * specific, written prior permission. Keith Packard makes no
- * representations about the suitability of this software for any purpose. It
- * is provided "as is" without express or implied warranty.
- *
- * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-#ifndef _XFIXES_H_
-#define _XFIXES_H_
-
-#include "resource.h"
-
-extern _X_EXPORT RESTYPE RegionResType;
-extern _X_EXPORT int XFixesErrorBase;
-
-#define VERIFY_REGION(pRegion, rid, client, mode) \
- do { \
- int err; \
- err = dixLookupResourceByType((pointer *) &pRegion, rid, \
- RegionResType, client, mode); \
- if (err == BadValue) { \
- client->errorValue = rid; \
- return XFixesErrorBase + BadRegion; \
- } else if (err != Success) { \
- client->errorValue = rid; \
- return err; \
- } \
- } while (0)
-
-#define VERIFY_REGION_OR_NONE(pRegion, rid, client, mode) { \
- pRegion = 0; \
- if (rid) VERIFY_REGION(pRegion, rid, client, mode); \
-}
-
-extern _X_EXPORT RegionPtr
-XFixesRegionCopy (RegionPtr pRegion);
-
-
-#endif /* _XFIXES_H_ */
+/*
+ * Copyright © 2002 Keith Packard
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the name of Keith Packard not be used in
+ * advertising or publicity pertaining to distribution of the software without
+ * specific, written prior permission. Keith Packard makes no
+ * representations about the suitability of this software for any purpose. It
+ * is provided "as is" without express or implied warranty.
+ *
+ * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+ * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifdef HAVE_DIX_CONFIG_H
+#include <dix-config.h>
+#endif
+
+#ifndef _XFIXES_H_
+#define _XFIXES_H_
+
+#include "resource.h"
+
+extern _X_EXPORT RESTYPE RegionResType;
+extern _X_EXPORT int XFixesErrorBase;
+
+#define VERIFY_REGION(pRegion, rid, client, mode) \
+ do { \
+ int err; \
+ err = dixLookupResourceByType((pointer *) &pRegion, rid, \
+ RegionResType, client, mode); \
+ if (err != Success) { \
+ client->errorValue = rid; \
+ return err; \
+ } \
+ } while (0)
+
+#define VERIFY_REGION_OR_NONE(pRegion, rid, client, mode) { \
+ pRegion = 0; \
+ if (rid) VERIFY_REGION(pRegion, rid, client, mode); \
+}
+
+extern _X_EXPORT RegionPtr
+XFixesRegionCopy (RegionPtr pRegion);
+
+
+#endif /* _XFIXES_H_ */