Path: utzoo!attcan!uunet!husc6!spdcc!bloom-beacon!ATHENA.MIT.EDU!swick From: swick@ATHENA.MIT.EDU (Ralph R. Swick) Newsgroups: comp.windows.x Subject: Re: Xtk string to pixmap converter problem Message-ID: <8808111624.AA02096@LYRE.MIT.EDU> Date: 11 Aug 88 16:24:38 GMT References: <205@torch.UUCP> Sender: daemon@bloom-beacon.MIT.EDU Organization: DEC/MIT Project Athena Lines: 23 Date: 5 Aug 88 15:54:51 GMT From: mcvax!ukc!stl!stc!datlog!torch!gary@uunet.uu.net (Gary Henderson) 1) I need two colours to use when converting a bitmap file into a pixmap. I can use the widget's background colour for one but what do I use for the other colour ? Since you haven't described the semantics of string to pixmap, all sorts of things are possible. It is not unreasonable to fetch additional resources from the resource database within a conversion procedure. You will want to carefully define the conversion attributes you depend upon (in convert_args) so as to get maximum benefit from the resource cache. 2) Once a given string has been converted into a pixmap, the resource converter manager caches the result (the pixmap XID) and will not call my routine again with the same string. Unfortunately, a core widget frees its background pixmap when it is being destroyed The fact that Core frees resources that it did not create has been reported as a bug. There is no reasonable workaround, but you could deduce a hack from what I said above.