[MPlayer-dev-eng] GUI's icon - a X11 issue?

Ingo Brückl ib at wupperonline.de
Sun Jun 12 00:10:52 CEST 2011


Steaphan Greene wrote on Sat, 11 Jun 2011 14:29:50 -0400:

> On 06/11/2011 09:57 AM, Ingo Brückl wrote:
>> Can I somehow further inspect the masks?

> I think it'd be easiest if I could debug the code directly myself.

Thank you very much, this is a very kind offer, but is seems that I could
fix it in the meantime myself (see icon.patch attached). BTW, is it ok to use
GC with no XGCValues that way or should I set any components?

I fixed it by writing a (pure X11) function that creates a Pixmap mask from a
GdkPixbuf. Sounds crazy, but this mask (although it should be the same one
that GDK creates) works fine while the GDK mask shows erratic failures (which
can be observed with the unpatched svn checkout).

Although I'm relieved to finally have found a solution, there are questions
and oddities left I'm very curious about. I don't know whether you are in the
mood for looking into them (attached test.patch), but I'd really like to
unravel some mysteries:

1. Why does the GDK mask (most often) not work?

2. Why do I get return code 1 instead of Success from XCopyArea() and
   XCopyPlane()?

3. Why is the mask copied with XCopyPlane() to the video window all black
   and doesn't show any contours?

Anyway, thanks a lot for the mask hint which gave me the direction.

Ingo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: icon.patch
Type: text/x-diff
Size: 4818 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20110612/cb8bb31e/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.patch
Type: text/x-diff
Size: 3790 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20110612/cb8bb31e/attachment-0003.bin>


More information about the MPlayer-dev-eng mailing list