summaryrefslogtreecommitdiff
path: root/src/drivers/WinAPI/Fl_WinAPI_Window_Driver.cxx
diff options
context:
space:
mode:
authorAlbrecht Schlosser <albrechts.fltk@online.de>2022-12-06 16:35:36 +0100
committerAlbrecht Schlosser <albrechts.fltk@online.de>2022-12-10 15:03:30 +0100
commit8dea6505e92a93156820ea24f1256f08cf2b9e8f (patch)
tree1b8c796048d5267b2fa5bbd2970a2a24cf8e9bb1 /src/drivers/WinAPI/Fl_WinAPI_Window_Driver.cxx
parent98d97daf112906fe1732c6a7d9c5db946e0e8df5 (diff)
Windows: fix memory leak caused by RegisterDragDrop (#569)
- call RevokeDragDrop() when the window is hidden - do not delete the *static* FLDropTarget object
Diffstat (limited to 'src/drivers/WinAPI/Fl_WinAPI_Window_Driver.cxx')
-rw-r--r--src/drivers/WinAPI/Fl_WinAPI_Window_Driver.cxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/drivers/WinAPI/Fl_WinAPI_Window_Driver.cxx b/src/drivers/WinAPI/Fl_WinAPI_Window_Driver.cxx
index 45e5cb39e..8a789bd1d 100644
--- a/src/drivers/WinAPI/Fl_WinAPI_Window_Driver.cxx
+++ b/src/drivers/WinAPI/Fl_WinAPI_Window_Driver.cxx
@@ -470,6 +470,9 @@ void Fl_WinAPI_Window_Driver::hide() {
return;
}
+ // Issue #569: undo RegisterDragDrop()
+ RevokeDragDrop((HWND)ip->xid);
+
// make sure any custom icons get freed
// icons(NULL, 0); // free_icons() is called by the Fl_Window destructor
// this little trick keeps the current clipboard alive, even if we are about