summaryrefslogtreecommitdiff
path: root/src/Fl_Input.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'src/Fl_Input.cxx')
-rw-r--r--src/Fl_Input.cxx15
1 files changed, 5 insertions, 10 deletions
diff --git a/src/Fl_Input.cxx b/src/Fl_Input.cxx
index b84457985..f7c5656c5 100644
--- a/src/Fl_Input.cxx
+++ b/src/Fl_Input.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_Input.cxx,v 1.10.2.3 1999/10/15 09:01:43 bill Exp $"
+// "$Id: Fl_Input.cxx,v 1.10.2.4 1999/10/30 20:21:29 bill Exp $"
//
// Input widget for the Fast Light Tool Kit (FLTK).
//
@@ -279,7 +279,6 @@ int Fl_Input::handle_key() {
}
int Fl_Input::handle(int event) {
- static char first_click;
switch (event) {
@@ -312,28 +311,24 @@ int Fl_Input::handle(int event) {
return handle_key();
case FL_PUSH:
- compose = 0;
- first_click = 0;
if (Fl::focus() != this) {
Fl::focus(this);
handle(FL_FOCUS);
// Windoze-style: select everything on first click:
if (type() != FL_MULTILINE_INPUT) {
- first_click = 1;
position(size(), 0); // select everything
- Fl::event_is_click(0); // prevents next click from being a double click
return 1;
}
}
- // don't remove selection when pasting in a replacement:
- if (Fl::event_button() == 2 && mark() != position()) return 1;
+ compose = 0;
break;
case FL_RELEASE:
if (Fl::event_button() == 2) {
Fl::event_is_click(0); // stop double click from picking a word
Fl::paste(*this);
- } else if (!first_click) {
+ } else if (!Fl::event_is_click()) {
+ // copy drag-selected text to the clipboard.
copy();
}
return 1;
@@ -350,5 +345,5 @@ Fl_Input::Fl_Input(int x, int y, int w, int h, const char *l)
}
//
-// End of "$Id: Fl_Input.cxx,v 1.10.2.3 1999/10/15 09:01:43 bill Exp $".
+// End of "$Id: Fl_Input.cxx,v 1.10.2.4 1999/10/30 20:21:29 bill Exp $".
//