libX11: Changes to 'master'
Josh Triplett
josh at kemper.freedesktop.org
Sun Nov 26 00:54:09 EET 2006
man/XGetWindowAttributes.man | 5 ++++-
1 files changed, 4 insertions(+), 1 deletion(-)
New commits:
commit f637a5b03164263a3af2e644cf655e52b015f1bb
Author: Ross Combs <rocombs at cs.nmsu.edu>
Date: Sat Nov 25 14:45:17 2006 -0800
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.
More information about the xorg-commit
mailing list