From f58b1a91b37e5ad758b3d0a3d9be950e8feb5d0c Mon Sep 17 00:00:00 2001 From: Pierre Ossman Date: Mon, 16 Jun 2014 11:39:32 +0000 Subject: Add ability to set custom icons for windows. STR #2816. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10197 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/Fl.cxx | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/Fl.cxx') diff --git a/src/Fl.cxx b/src/Fl.cxx index c3b935987..714c8deee 100644 --- a/src/Fl.cxx +++ b/src/Fl.cxx @@ -1489,6 +1489,8 @@ void Fl_Window::hide() { handle(FL_HIDE); #if defined(WIN32) + // make sure any custom icons get freed + icons(NULL, 0); // this little trick keeps the current clipboard alive, even if we are about // to destroy the window that owns the selection. if (GetClipboardOwner()==ip->xid) @@ -1553,6 +1555,8 @@ Fl_Window::~Fl_Window() { if (xclass_) { free(xclass_); } + free_icons(); + delete icon_; } // FL_SHOW and FL_HIDE are called whenever the visibility of this widget -- cgit v1.2.3