diff -urN fltk-1.3.x-r7473/FL/Fl_Window.H fltk-1.3.x-r7473-2/FL/Fl_Window.H --- fltk-1.3.x-r7473/FL/Fl_Window.H 2010-03-16 17:51:31.000000000 -0500 +++ fltk-1.3.x-r7473-2/FL/Fl_Window.H 2010-04-09 15:14:47.000000000 -0500 @@ -62,7 +62,7 @@ const char* iconlabel_; const char* xclass_; - const void* icon_; + const void* icon_[2]; // size_range stuff: int minw, minh, maxw, maxh; int dw, dh, aspect; @@ -340,10 +340,16 @@ is not copied. */ void xclass(const char* c) {xclass_ = c;} - /** Gets the current icon window target dependent data. */ - const void* icon() const {return icon_;} - /** Sets the current icon window target dependent data. */ - void icon(const void * ic) {icon_ = ic;} + /** + Gets the current window icon window target dependent data. Up to two target + dependent pointers can be stored and retrieved. + */ + const void* icon(int which = 0) const {return icon_[which & 1];} + /** + Sets the current window icon window target dependent data. Up to two target + dependent pointers can be stored and retrieved. + */ + void icon(const void *ic, const void *ic2 = 0) {icon_[0] = ic; icon_[1] = ic2;} /** Returns non-zero if show() has been called (but not hide() diff -urN fltk-1.3.x-r7473/documentation/src/osissues.dox fltk-1.3.x-r7473-2/documentation/src/osissues.dox --- fltk-1.3.x-r7473/documentation/src/osissues.dox 2010-03-22 13:51:56.000000000 -0500 +++ fltk-1.3.x-r7473-2/documentation/src/osissues.dox 2010-04-09 15:14:47.000000000 -0500 @@ -381,7 +381,7 @@ \code #include "icon.xbm" -fl_open_display(); // needed if display has not been previously opened +fl_open_display(); // needed if display has not been previously opened Pixmap p = XCreateBitmapFromData(fl_display, DefaultRootWindow(fl_display), icon_bits, icon_width, icon_height); @@ -396,14 +396,15 @@ #include #include "icon.xpm" -fl_open_display(); // needed if display has not been previously opened +fl_open_display(); // needed if display has not been previously opened Pixmap p, mask; XpmCreatePixmapFromData(fl_display, DefaultRootWindow(fl_display), icon_xpm, &p, &mask, NULL); -window->icon((char *)p); +window->icon((char *)p); // sets only the icon +window->icon((char *)p, (char *)mask); // sets both the icon and its mask \endcode \par diff -urN fltk-1.3.x-r7473/src/Fl_Window.cxx fltk-1.3.x-r7473-2/src/Fl_Window.cxx --- fltk-1.3.x-r7473/src/Fl_Window.cxx 2010-03-29 09:10:54.000000000 -0500 +++ fltk-1.3.x-r7473-2/src/Fl_Window.cxx 2010-04-09 15:14:47.000000000 -0500 @@ -52,7 +52,7 @@ } i = 0; xclass_ = 0; - icon_ = 0; + icon_[0] = icon_[1] = 0; iconlabel_ = 0; resizable(0); size_range_set = 0; diff -urN fltk-1.3.x-r7473/src/Fl_x.cxx fltk-1.3.x-r7473-2/src/Fl_x.cxx --- fltk-1.3.x-r7473/src/Fl_x.cxx 2010-04-06 15:20:18.000000000 -0500 +++ fltk-1.3.x-r7473-2/src/Fl_x.cxx 2010-04-09 15:14:47.000000000 -0500 @@ -1582,6 +1582,7 @@ } if (win->icon()) { hints->icon_pixmap = (Pixmap)win->icon(); + hints->icon_mask = (Pixmap)win->icon(1); hints->flags |= IconPixmapHint; } XSetWMHints(fl_display, xp->xid, hints);