| Description: |
OriginalBugID: 716 Bug
Version: 8.0.3
SubmitDate: '1998-10-13'
LastModified: '1999-12-21'
Severity: SER
Status: Released
Submitter: admin
ChangedBy: hobbs
RelatedBugIDs: 720 1355 1376 2492
OS: All Unix
OSVersion: NA
Machine: NA
FixedDate: '1999-12-21'
FixedInVersion: 8.3b1
A while ago I noticed a problem when we first tried to convert to 8.0,
and that was that the application would crash with the following error:
> X Error of failed request: BadWindow (invalid Window parameter)
> Major opcode of failed request: 40 (X_TranslateCoords)
> Resource id in failed request: 0x1400246
> Serial number of failed request: 15956
> Current serial number in output stream: 15956
It seemed to be related to including Tix calls, and so I sent a message
to the Tix mailing list to see if anyone else had encountered it.
Other people had, and I was sent the attached patch to tkUnixWm.c.
I applied the patch, and it worked fine. Now, with 8.0.3, it is
dumping again with the same error.
*** tkUnixWm.c.org Thu Aug 14 00:24:53 1997
--- tkUnixWm.c Tue Aug 26 08:31:09 1997
***************
*** 3377,3382 ****
--- 3377,3383 ----
if (root == None) {
root = RootWindowOfScreen(Tk_Screen((Tk_Window)winPtr));
}
+
XTranslateCoordinates(winPtr->display, winPtr->window,
root, 0, 0, &rootX, &rootY, &dummyChild);
x += rootX;
***************
*** 3434,3439 ****
--- 3435,3441 ----
int x, y, childX, childY, tmpx, tmpy, bd;
WmInfo *wmPtr;
TkWindow *winPtr, *childPtr, *nextPtr;
+ Tk_ErrorHandler handler;
/*
* Step 1: scan the list of toplevel windows to see if there is a
***************
*** 3472,3483 ****
--- 3474,3494 ----
* the toplevel.
*/
+ handler = Tk_CreateErrorHandler(Tk_Display(tkwin), -1, -1, -1,
+ (Tk_ErrorProc *) NULL, (ClientData) NULL);
+
while (1) {
+
if (XTranslateCoordinates(Tk_Display(tkwin), parent, window,
x, y, &childX, &childY, &child) == False) {
+
+ fprintf (stderr, "Tk_CoordsToWindow got False return from
XTranslateCoordinates\n");
+ fflush (stderr);
+ return NULL;
panic("Tk_CoordsToWindow got False return from XTranslateCoordinates");
}
if (child == None) {
+ Tk_DeleteErrorHandler(handler);
return NULL;
}
for (wmPtr = firstWmPtr; wmPtr != NULL; wmPtr = wmPtr->nextPtr) {
***************
*** 3499,3504 ****
--- 3510,3517 ----
}
gotToplevel:
+
+ Tk_DeleteErrorHandler(handler);
winPtr = wmPtr->winPtr;
if (winPtr->mainPtr != ((TkWindow *) tkwin)->mainPtr) {
return NULL;
The same translate problem is seen, always with Tix involved,
from the following people:
[email protected] [email protected] [email protected] [email protected] [email protected]
See related ids for more.
-- 08/14/1999 hobbs
Fixed for 8.3b1.
-- 12/21/1999 hobbs
|