XForms: Re: X Error of failed request: BadWindow (invalid Window parameter)

Joel Weiner (weiner@mcci-arl-va.com)
Fri, 11 Jul 1997 10:54:40 -0400

To subscribers of the xforms list from weiner@mcci-arl-va.com (Joel Weiner) :

Regarding the msg of July 10:

>> Now to the question. From time to time I get the following error:
>>
>> X Error of failed request: BadWindow (invalid Window parameter)
>> Major opcode of failed request: 2 (X_ChangeWindowAttributes)
>>
>> It doesn't occur very frequently, but sometimes after an
>> fl_show_alert(). Am I misusing fl_winget() or fl_get_display(), or am I
>> doing something else hair-raising?
>
>You may not be getting the correct Window XID. It sounds as if
>there's a race condition that confuses fl_winget(). It may be getting
>the Window XID of the alert window rather than the current active
>window depending upon how quickly things get destroyed.

I've had similar problems when trying to refresh a free object after an alert.
My solution was to call fl_winset with the 'Window' value of the form from
which I called the alert. This stopped my problem and doesn't seem to have any adverse effects.

In debugging the above problem, I found that even though the alert had returned,
the Window XID of the alert was still being returned in fl_winget.

J. Weiner
_________________________________________________
To unsubscribe, send the message "unsubscribe" to
xforms-request@bob.usuf2.usuhs.mil or see
http://bob.usuf2.usuhs.mil/mailserv/xforms.html
Xforms Home Page: http://bragg.phys.uwm.edu/xforms
List Archive: http://bob.usuf2.usuhs.mil/mailserv/list-archives/