| Unix Content | Register | FAQ | Calendar | Search | Today's Posts | Mark Forums Read |
|
#1
|
| I am using KDE 3.5 on Fedora 5. I have a Perl/Tk app that I wish to give its own icon rather than the standard "X" icon that (I guess) my theme provides as a default. How do I do that? Thanks! |
|
#2
|
| On Sep 26, 6:43*pm, Jerome > I am using KDE 3.5 on Fedora 5. I have a Perl/Tk app that I wish to give its > own icon rather than the standard "X" icon that (I guess) my theme provides > as a default. How do I do that? Thanks! Use the icon_pixmap field of the XWMHints variable passed to XSetWMHints() -- Fred Kleinschmidt |
|
#3
|
| Jerome wrote: > I am using KDE 3.5 on Fedora 5. I have a Perl/Tk app that I wish to give its > own icon rather than the standard "X" icon that (I guess) my theme provides > as a default. How do I do that? Thanks! > This is how I managed it in Object Pascal. const IconBitmapWidth = 16; IconBitmapHeight = 16; IconBitmapBits: packed array[1..32] of Byte = ( $00, $00, $78, $07, $08, $09, $38, $09, $08, $07, $08, $01, $08, $01, $00, $00, $00, $00, $98, $74, $a4, $24, $84, $24, $b4, $24, $a4, $24, $18, $73, $00, $00); ....and then the actual code... var IconPixmap: TPixmap; WMHints: PXWMHints; IconPixMap := XCreateBitmapFromData(fpgApplication.Display, FWinHandle, @IconBitmapBits, IconBitmapWidth, IconBitmapHeight); WMHints := XAllocWMHints; WMHints^.icon_pixmap := IconPixmap; WMHints^.flags := IconPixmapHint; XSetWMProperties(fpgApplication.Display, FWinHandle, nil, nil, nil, 0, nil, WMHints, nil); I hope that helps. Regards, - Graeme - __________________________________________________ _____ fpGUI - a cross-platform GUI toolkit using Free Pascal http://opensoft.homeip.net/fpgui/ |