Unmapped or discarded windows.
Submitted by Serdar KÖYLÜ
Assigned to Stuart Anderson @anderson
Description
I try get list of childrens for window xyz:
XQueryTree(do->xdpy, window, &dummy, &dummy, &children, &nchildren);
Call return many n umbers of windows, ok. Such as: { 1, 2, 3, 4 }
I do query this windows for isviewable or other property, or any other operation:
X Error of failed request: BadWindow (invalid Window parameter) Major opcode of failed request: 42 (X_SetInputFocus) Resource id in failed request: 0x5 Serial number of failed request: 16 Current serial number in output stream: 16
Yes, this is not an actual message, but the problem is same.
If try to access an ummaped (or similar state) window, XTest/XLib print an error message and app. exit to system immediately.
I don't find any method for check "state of an unmapped window".
If a window is not accesible, why its listed with "XQueryTree"? Or if its listed in this structure, we can access and find its a "unmapped window". This case has a great pitfall for testing apps, i thing this.
A XGetWindowAttributes call to "unmapped window" must be return a error, or return a valid attribute struct. We must look its property "isviewable" or etc. It's real?
But currently its returned a fatal-error and XLib call "exit(1)" syscall on _XError, _XDefaultError functions. This reason make impossible for generic window test application development..