summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMatthias Melcher <fltk@matthiasm.com>2005-06-01 07:48:16 +0000
committerMatthias Melcher <fltk@matthiasm.com>2005-06-01 07:48:16 +0000
commitdf32d2a9b8de1b0fe7452c1c164d5c49ed18c341 (patch)
tree6148d7217bb98414be1c99f0955d6d20a4af563c /src
parent04c67e441e13bc3e0e786cda5da6318334f5658b (diff)
Fl::copy() would always set a flag, instructing Fl::paste to use the internal clipboard. ALthough that is faster, Fl::paste() would eventually miss changes to the external clipboard.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4387 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src')
-rw-r--r--src/Fl_win32.cxx6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/Fl_win32.cxx b/src/Fl_win32.cxx
index 6fbec0146..5ca8abf79 100644
--- a/src/Fl_win32.cxx
+++ b/src/Fl_win32.cxx
@@ -384,11 +384,15 @@ void Fl::copy(const char *stuff, int len, int clipboard) {
if (clipboard) {
// set up for "delayed rendering":
if (OpenClipboard(fl_xid(Fl::first_window()))) {
+ // if the system clipboard works, use it
EmptyClipboard();
SetClipboardData(CF_TEXT, NULL);
CloseClipboard();
+ fl_i_own_selection[clipboard] = 0;
+ } else {
+ // only if it fails, instruct paste() to use the internal buffers
+ fl_i_own_selection[clipboard] = 1;
}
- fl_i_own_selection[clipboard] = 1;
}
}