summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoss Combs <rocombs@cs.nmsu.edu>2006-11-25 14:45:17 -0800
committerJosh Triplett <josh@freedesktop.org>2006-11-25 14:54:06 -0800
commitf637a5b03164263a3af2e644cf655e52b015f1bb (patch)
tree35d0729720989b4b9fdc9b08d28cd89a5e35adb9
parentc6a0b0f18ed1242eeb908f5cf767ab8381edd456 (diff)
Debian bug #354315: Clarify return value in XGetWindowAttributes man page
This man page does not discuss the actual return values of the function, but says they are of type "Status". One might assume that this means you could compare it with the "Success" macro. One would be wrong. The X functions seem to have two three types representing status. If it is an "int" there are a number of error codes or "Success" which can be compared against. If it is a bool, the result can be compared with "True" or "False". If the return type is "Status" it appears that the return type is either 0 or 1. Unfortunately the value for Success is zero, so it is important to distinguish between the first two types of return values and the third; otherwise the conditional will be inverted. XGetWindowAttributes() is one of the functions which returns zero for failure. The man page should make this clear.
-rw-r--r--man/XGetWindowAttributes.man5
1 files changed, 4 insertions, 1 deletions
diff --git a/man/XGetWindowAttributes.man b/man/XGetWindowAttributes.man
index d0521ad..b7665b7 100644
--- a/man/XGetWindowAttributes.man
+++ b/man/XGetWindowAttributes.man
@@ -193,7 +193,8 @@ The
.ZN XGetWindowAttributes
function returns the current attributes for the specified window to an
.ZN XWindowAttributes
-structure.
+structure. It returns a nonzero status on success; otherwise, it returns a
+zero status.
.LP
.ZN XGetWindowAttributes
can generate
@@ -210,6 +211,8 @@ border width, and depth.
These are described in the argument list.
It is legal to pass to this function a window whose class is
.ZN InputOnly .
+It returns a nonzero status on success; otherwise, it returns a
+zero status.
.SH STRUCTURES
The
.ZN XWindowAttributes