]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/taskbar.cpp
another makefile updated
[wxWidgets.git] / src / msw / taskbar.cpp
index fdf563dc377958c13b6a9de3d0664a1b4a2bb02b..e9ba5a03c6f7c55cfee7ee6af71ab87b8266739c 100644 (file)
 
 #ifndef __TWIN32__
 #ifdef __GNUWIN32__
+#ifndef wxUSE_NORLANDER_HEADERS
 #include <wx/msw/gnuwin32/extra.h>
 #endif
 #endif
+#endif
 
 #ifdef __SALFORDC__
 #include <shellapi.h>
@@ -164,10 +166,16 @@ bool wxTaskBarIcon::PopupMenu(wxMenu *menu) //, int x, int y);
     win = new wxFrame(NULL, -1, "", wxPoint(x,y), wxSize(-1,-1), 0);
     win->PushEventHandler(this);
 
+    // Remove from record of top-level windows, or will confuse wxWindows
+    // if we try to exit right now.
+    wxTopLevelWindows.DeleteObject(win);
+
     rval = win->PopupMenu(menu, 0, 0);
 
     win->PopEventHandler(FALSE);
     win->Destroy();
+    delete win;
+
     return rval;
 }