diff options
author | marha <marha@users.sourceforge.net> | 2012-01-11 08:55:02 +0100 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2012-01-11 08:57:05 +0100 |
commit | a73c45b7c72c6e426e1c75dd939f5481227b6979 (patch) | |
tree | aba5ced82f492a7e28dfa683144dfbd6293d9613 /xorg-server/dix/dixutils.c | |
parent | d60b5206a10c9d547a7230a991593b516e412204 (diff) | |
parent | 38e661c7d82fa0b34fbe9b3f3261295787bb6427 (diff) | |
download | vcxsrv-a73c45b7c72c6e426e1c75dd939f5481227b6979.tar.gz vcxsrv-a73c45b7c72c6e426e1c75dd939f5481227b6979.tar.bz2 vcxsrv-a73c45b7c72c6e426e1c75dd939f5481227b6979.zip |
Merge remote-tracking branch 'origin/released'
Conflicts:
pixman/pixman/pixman-trap.c
xorg-server/Xext/xace.c
xorg-server/dix/dispatch.c
xorg-server/hw/xwin/winclipboardthread.c
xorg-server/hw/xwin/winengine.c
xorg-server/hw/xwin/winwin32rootlesswindow.c
xorg-server/include/dixstruct.h
xorg-server/os/connection.c
Diffstat (limited to 'xorg-server/dix/dixutils.c')
-rw-r--r-- | xorg-server/dix/dixutils.c | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/xorg-server/dix/dixutils.c b/xorg-server/dix/dixutils.c index 00bbde67c..da26dc144 100644 --- a/xorg-server/dix/dixutils.c +++ b/xorg-server/dix/dixutils.c @@ -202,13 +202,12 @@ dixLookupDrawable(DrawablePtr *pDraw, XID id, ClientPtr client, int rc; *pDraw = NULL; - client->errorValue = id; - - if (id == INVALID) - return BadDrawable; rc = dixLookupResourceByClass((pointer *)&pTmp, id, RC_DRAWABLE, client, access); + if (rc != Success) + client->errorValue = id; + if (rc == BadValue) return BadDrawable; if (rc != Success) @@ -225,7 +224,15 @@ dixLookupWindow(WindowPtr *pWin, XID id, ClientPtr client, Mask access) { int rc; rc = dixLookupDrawable((DrawablePtr*)pWin, id, client, M_WINDOW, access); - return (rc == BadDrawable) ? BadWindow : rc; + /* dixLookupDrawable returns BadMatch iff id is a valid Drawable + but is not a Window. Users of dixLookupWindow expect a BadWindow + error in this case; they don't care that it's a valid non-Window XID */ + if (rc == BadMatch) + rc = BadWindow; + /* Similarly, users of dixLookupWindow don't want BadDrawable. */ + if (rc == BadDrawable) + rc = BadWindow; + return rc; } int |