diff --git a/CHANGES b/CHANGES index 85c8e8c11..a0ad50f4f 100644 --- a/CHANGES +++ b/CHANGES @@ -2,6 +2,8 @@ CHANGES IN FLTK 1.1.7 - Documentation fixes (STR #648, STR #692, STR #730, STR #744, STR #745) + - Fl::paste would sometimes not recoginze external + changes of the clipboard (STR #722) - Clipping fixes for OSX - Removed attempt to find items via Fl_Menu_::find_item() in linked submenus 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; } }