summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael R Sweet <michael.r.sweet@gmail.com>1999-05-15 14:31:32 +0000
committerMichael R Sweet <michael.r.sweet@gmail.com>1999-05-15 14:31:32 +0000
commit7fad9c354ba170d285e0d0bdcf1fe7c045d9f4cc (patch)
tree19e74564c4de5d6d4a8619b0429b9d62223fc0f4
parent9324cc741c212c023509b74e4a5fdbd764dee1e4 (diff)
Fixed WIN32 selection bug - wasn't checking to see if the
WM_DESTROYCLIPBOARD message from coming from our own window. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.0@589 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
-rw-r--r--src/Fl_cutpaste_win32.cxx11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/Fl_cutpaste_win32.cxx b/src/Fl_cutpaste_win32.cxx
index d47e9b37e..52715055e 100644
--- a/src/Fl_cutpaste_win32.cxx
+++ b/src/Fl_cutpaste_win32.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_cutpaste_win32.cxx,v 1.5 1999/03/02 07:03:15 bill Exp $"
+// "$Id: Fl_cutpaste_win32.cxx,v 1.5.2.1 1999/05/15 14:31:32 mike Exp $"
//
// WIN32 cut/paste for the Fast Light Tool Kit (FLTK).
//
@@ -33,6 +33,7 @@
#include <FL/x.H>
#include <FL/Fl_Widget.H>
#include <string.h>
+#include <stdio.h>
static char *selection_buffer;
static int selection_length;
@@ -46,8 +47,10 @@ static int selection_xevent_handler(int) {
switch (fl_msg.message) {
case WM_DESTROYCLIPBOARD:
- Fl::selection_owner(0);
- Fl::flush(); // get the redraw to happen
+ if (fl_msg.hwnd != fl_xid(Fl::first_window())) {
+ Fl::selection_owner(0);
+ Fl::flush(); // get the redraw to happen
+ }
return 1;
case WM_RENDERALLFORMATS:
@@ -129,5 +132,5 @@ void Fl::paste(Fl_Widget &receiver) {
}
//
-// End of "$Id: Fl_cutpaste_win32.cxx,v 1.5 1999/03/02 07:03:15 bill Exp $".
+// End of "$Id: Fl_cutpaste_win32.cxx,v 1.5.2.1 1999/05/15 14:31:32 mike Exp $".
//