> django wrote: > > Hey, > > > > I have an issue loading an application icon in Linux using X11 and > > the libxpm-dev package. When I load my application the icon > > background is black instead of transparent. > > ... > > Could any1 advise me on how to load the application icon with a > > transparent background? > > The issue is that Fl_Window::icon() doesn't support an image mask, > which is what provides the transparency... > > -- > ______________________________________________________________________ > Michael Sweet, Easy Software Products mike at easysw dot com
Yeh after looking at how FL_x implements the icon, I hacked in image masks bypassing fltk's icon support and called the X windows functions instead: .. fl_open_display(); .. win->show(); .. #include "icon1.xpm" Pixmap p, mask; XpmAttributes xpm_attributes; XpmCreatePixmapFromData(fl_display, RootWindow(fl_display, fl_screen), icon1, &p, &mask, &xpm_attributes); XWMHints *hints; hints = XGetWMHints(fl_display, fl_xid(win)); hints->icon_pixmap = p; hints->icon_mask = mask; hints->flags = IconPixmapHint | IconMaskHint; XSetWMHints(fl_display, fl_xid(win), hints); .. Added the code in case any1 else comes across the same issue. Cheers Django. _______________________________________________ fltk mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk

