> > window must be shown before setting the icon. > Jacques Senecal. > >
Thanks, that prevents the crash but the icon is not shown in the window. I have this now: #include <fltk/x11.h> #include <fltk/run.h> #include <fltk/Window.h> #include <X11/xpm.h> #include "../icons/viewer.xpm" #include <iostream> int main( int argc, char** argv ) { fltk::Window window( 120, 220 ); window.show(); Pixmap p, mask; if ( XpmCreatePixmapFromData(fltk::xdisplay, DefaultRootWindow(fltk::xdisplay), viewer_xpm, &p, &mask, NULL) == XpmSuccess ) { // uncomment to crash program window.icon((char *)p); std::cerr << "set icon" << std::endl; } fltk::run(); return 0; } _______________________________________________ fltk mailing list fltk@easysw.com http://lists.easysw.com/mailman/listinfo/fltk