Skip to content

Commit

Permalink
Clipboard will persist if owner window is hidden (STR #1019)
Browse files Browse the repository at this point in the history
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4565 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
  • Loading branch information
Matthias Melcher committed Sep 12, 2005
1 parent fe934da commit c526a7a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGES
Expand Up @@ -3,6 +3,7 @@ CHANGES IN FLTK 1.1.7
- Documentation fixes (STR #571, STR #648, STR #692, STR
#730, STR #744, STR #745, STR #931, STR #942, STR #960,
STR #969)
- Clipboard will persist if owner window is hidden (STR #1019)
- Fixed handling of Win32 Device Contexts (STR #1007)
- Fixed C Plus Plus style comments in C files (STR #997)
- Fixed signednes of scanf argument (STR #996)
Expand Down
10 changes: 10 additions & 0 deletions src/Fl.cxx
Expand Up @@ -849,6 +849,16 @@ void Fl_Window::hide() {
handle(FL_HIDE);

#ifdef WIN32
// 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) {
Fl_Window *w1 = Fl::first_window();
if (w1 && OpenClipboard(fl_xid(w1))) {
EmptyClipboard();
SetClipboardData(CF_TEXT, NULL);
CloseClipboard();
}
}
// Send a message to myself so that I'll get out of the event loop...
PostMessage(ip->xid, WM_APP, 0, 0);
if (ip->private_dc) fl_release_dc(ip->xid, ip->private_dc);
Expand Down

0 comments on commit c526a7a

Please sign in to comment.