On Thu, 25 Oct 2012, Iain Patterson escribió:
> Quoth Christophe,
>
> >The code was setting some values in the window's attribute structure
> >which were not being used (missing the corresponding vmask flag) and
> >was setting some vmask bits without setting the corresponding
> >value in the structure.
>
> This patch breaks the frame extents stuff I submitted recently.
> With the patch and compton set to draw semi-opaque frame extents
> what actually happens is no window decorations are drawn and a bunch
> of BadDrawable errors are spewed to the console.
>
> After reverting the patch everything works again.
I have a question about it.
After my proposed patch (see my yesterday's mail), I was testing it. I found a
problem with the image, is not perfect in icons with title (is not bad, but is
not perfect), and I changed some things:
if (image) {
if (icon->show_title)
theight = WMFontHeight(scr->icon_title_font);
getSize(icon->icon_win, &width, &height, &depth);
printf("Win size = %u,%u\n", width, height);
//this crash image = wIconValidateIconSize(image,
wPreferences.icon_size - theight);
image = wIconValidateIconSize(image, wPreferences.icon_size);
x = (wPreferences.icon_size - image->width) / 2;
y = theight + (wPreferences.icon_size - theight -
image->height) / 2;
RCombineArea(tile, image, 0, 0, image->width, image->height, x,
y);
}
I try to change "wPreferences.icon_size" by "wPreferences.icon_size - theight".
It works, but sometimes wmaker crash :-( I found that the problem is that the
icon height is not ok, sometimes is bad:
Win sizeo = 36906368,0
wmaker(catchXError(startup.c:177)): warning: internal X error: BadDrawable
(invalid Pixmap or Window parameter)
Request code: 14 X_GetGeometry
Request minor code: 0
Resource ID: 0x0
Error serial: 31538
And I have a lot of BadDrawable errors:
Tamaño = 1041326260,32660
wmaker(catchXError(startup.c:177)): warning: internal X error: BadDrawable
(invalid Pixmap or Window parameter)
Request code: 14 X_GetGeometry
Request minor code: 0
Resource ID: 0x0
Error serial: 35963
I removed the Christophe's patch, trying to see if the problem is there, but
no. Probably you are right, the Christophe's patch is not ok (I don't know),
but I have other problems with BadDrawable errors.
What should we do with the getSize function? Why it is returning "0" as height?
Thanks
kix
--
||// //\\// Rodolfo "kix" Garcia
||\\// //\\ http://www.kix.es/
--
To unsubscribe, send mail to [email protected].