diff options
author | marha <marha@users.sourceforge.net> | 2010-05-20 07:07:37 +0000 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2010-05-20 07:07:37 +0000 |
commit | 3319741e6f9fc3232eb40462a261271b9af2dcb2 (patch) | |
tree | ffe7fbae59390aafa850dcdbd3ea48d2cb59bda0 /xorg-server/xfixes | |
parent | 153f5cafa19da4e4c0cf21e9c909958359ed8ebd (diff) | |
download | vcxsrv-3319741e6f9fc3232eb40462a261271b9af2dcb2.tar.gz vcxsrv-3319741e6f9fc3232eb40462a261271b9af2dcb2.tar.bz2 vcxsrv-3319741e6f9fc3232eb40462a261271b9af2dcb2.zip |
xserver git update 20/5/2010
Diffstat (limited to 'xorg-server/xfixes')
-rw-r--r-- | xorg-server/xfixes/cursor.c | 13 | ||||
-rw-r--r-- | xorg-server/xfixes/region.c | 6 | ||||
-rw-r--r-- | xorg-server/xfixes/select.c | 4 | ||||
-rw-r--r-- | xorg-server/xfixes/xfixes.c | 1 | ||||
-rw-r--r-- | xorg-server/xfixes/xfixes.h | 113 |
5 files changed, 64 insertions, 73 deletions
diff --git a/xorg-server/xfixes/cursor.c b/xorg-server/xfixes/cursor.c index 296836055..d133f8c7b 100644 --- a/xorg-server/xfixes/cursor.c +++ b/xorg-server/xfixes/cursor.c @@ -70,10 +70,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; \
} \
@@ -164,13 +161,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;
@@ -884,7 +879,7 @@ ProcXFixesHideCursor (ClientPtr client) client, DixGetAttrAccess);
if (ret != Success) {
client->errorValue = stuff->window;
- return (ret == BadValue) ? BadWindow : ret;
+ return ret;
}
/*
@@ -947,7 +942,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_ */
|