mirror of
https://github.com/X11Libre/xserver.git
synced 2026-09-18 19:52:21 +00:00
Return an appropriately-typed error from dixLookupResourceByType.
Rather than always returning BadValue, associate an error status like BadWindow with a resource type like RT_WINDOW, and return the appropriate one for the requested type. This patch only touches the core protocol resource types. Others still return BadValue and need to be mapped appropriately. dixLookupResourceByType can now return BadImplementation, if the caller asked for a resource type that has not been allocated in the server. Signed-off-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Adam Jackson <ajax@redhat.com>
This commit is contained in:
parent
90e612dcbe
commit
e291c56182
21 changed files with 124 additions and 93 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue