fgreco@fis2.govt.shearson.com (Frank Greco) (06/22/91)
I have a frame that brings up a popup w/ a TEXTSW.
Before showing itself, the popup uses defaults_get_string()
to get the font for the TEXTSW.
This works fine when the popup/TEXTSW is initially brought up.
However when I change the resource database *while the app
is running* and then popup the TEXTSW, it simply ignores me.
Here's a little slice of pgm that illustrates the problem:
while(1)
{
printf("> ");
gets(buf);
if ( !strcmp(buf, "quit") )
exit(1);
fontname = (char *)defaults_get_string("textsw.font", "Textsw.Font", "fixed");
font = xv_find(NULL, FONT,
FONT_NAME, fontname,
0);
fprintf(stderr, "fontname = [%s] font: %x\n", fontname, font);
}
> <CR>
fontname = [lucidasanstypewriter-bold-12] font: 11fb0
> <CR>
fontname = [lucidasanstypewriter-bold-12] font: 11fb0
...now go to another window and change the X resource database, ie,
% xrdb -merge
textsw.font: palatino-bold-24
^D
% xrdb -query | grep -i textsw
textsw.font: palatino-bold-24 <== just to be sure
...now continue running the little pgm...
> <CR>
fontname = [lucidasanstypewriter-bold-12] font: 11fb0
Why am I not getting a different fontname back from defaults_get_string() ?
Am I missing something or is XView missing something? Does anyone know
if perhaps, XView caches the resource db upon invocation and never gets property
notify events (...i'm groping folks...)?
Thanks everyone,
Frank G.
(and yes, both windows are using the same DISPLAY var)