Commit 35f6b32c authored by Ulrich Sibiller's avatar Ulrich Sibiller Committed by Mike Gabriel

NXproperty.c:add debug output

parent 6cdddadf
...@@ -88,6 +88,11 @@ typedef struct ...@@ -88,6 +88,11 @@ typedef struct
nxagentWMStateRec; nxagentWMStateRec;
#endif #endif
#define PANIC
#define WARNING
#undef TEST
#undef DEBUG
int int
ProcChangeProperty(ClientPtr client) ProcChangeProperty(ClientPtr client)
{ {
...@@ -563,15 +568,25 @@ GetWindowProperty(pWin, property, longOffset, longLength, delete, ...@@ -563,15 +568,25 @@ GetWindowProperty(pWin, property, longOffset, longLength, delete,
unsigned long n, len, ind; unsigned long n, len, ind;
if (!pWin) if (!pWin)
{
#ifdef DEBUG
fprintf(stderr, "%s: invalid window\n", __func__);
#endif
return BadWindow; return BadWindow;
}
if (!ValidAtom(property)) if (!ValidAtom(property))
{ {
#ifdef DEBUG
fprintf(stderr, "%s: invalid atom [%d]\n", __func__, property);
#endif
return(BadAtom); return(BadAtom);
} }
if ((type != AnyPropertyType) && !ValidAtom(type)) if ((type != AnyPropertyType) && !ValidAtom(type))
{ {
#ifdef DEBUG
fprintf(stderr, "%s: invalid type [%d]\n", __func__, type);
#endif
return(BadAtom); return(BadAtom);
} }
...@@ -588,7 +603,12 @@ GetWindowProperty(pWin, property, longOffset, longLength, delete, ...@@ -588,7 +603,12 @@ GetWindowProperty(pWin, property, longOffset, longLength, delete,
if (!pProp) if (!pProp)
{
#ifdef DEBUG
fprintf(stderr, "%s: property not found [%d]\n", __func__, property);
#endif
return (BadAtom); return (BadAtom);
}
/* If the request type and actual type don't match. Return the /* If the request type and actual type don't match. Return the
property information, but not the data. */ property information, but not the data. */
...@@ -615,6 +635,9 @@ GetWindowProperty(pWin, property, longOffset, longLength, delete, ...@@ -615,6 +635,9 @@ GetWindowProperty(pWin, property, longOffset, longLength, delete,
if (n < ind) if (n < ind)
{ {
#ifdef DEBUG
fprintf(stderr, "%s: negative property len\n", __func__);
#endif
return BadValue; return BadValue;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment