hi George, and thank ou for your answer. George Peter Staplin a écrit :
Quoted nico <sl1200mk2@gmail.com>:
i had this error : X Error of failed request : BadIDChoice (invalid resource ID chosen for this connection) Major opcode of failed request: 148 (RENDER) Minor opcode of failed request: 4 (RenderCreatePicture) Resource id in failed request: 0xa876d1 Serial number of failed request: 2704569 Current serial number in output stream: 2704572
Hi Nico,
I believe I may have seen this error before in the context of Tk. I'm a Tk maintainer/developer on SourceForge.
Are you trying to draw text with something like Tk_DrawChars? Be aware that Tk for X11 will fail if you try to draw to a 1-bit deep Pixmap. This is a regression in Tk that occurred in 8.5, when the libXft-based text rendering was added. libXft IIRC uses Render. I wrote a patch for this issue that solved the problem for some users that used BLT and other extensions, but the other Tk developers thought the fix was too costly, and believed it would harm network Tk performance. Unfortunately there isn't a better way of solving the problem, and it certainly hasn't been solved by the other developers, so if this is the problem, you should use a deeper Pixmap, or --disable-xft. all my app is built over display and changing canvas text.... a shame !! i don't use any extension exept Tk, and all text update are interpreted via itemconfigure. i never call Tk command directly, i always use the Tcl side.
if i use --disable-xft, font won't be aliased.... not so good
An easy way to confirm if the problem is caused by what I suspect it is, is to configure Tk with --disable-xft.
This is from the tk/unix/README: --disable-xft Disable support for antialiased fonts via the Freetype/xft library. By default, this is switched on whenever the configure script can detect the required libraries.
If the problem goes away, then look for pixmaps with limited depth, and try to use 8 or more as a depth.
as i'm using Tcl to update Tk's canvas, how can i determine if they're 1 bits or 8 bits depth ?? also, how can i try your patch because i'm not aware of Tcl network ?
George
++ nico