summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBill Spitzak <spitzak@gmail.com>1999-03-01 03:44:30 +0000
committerBill Spitzak <spitzak@gmail.com>1999-03-01 03:44:30 +0000
commit32291ad0d5d9312534fa3c061c13535a38fa5a2c (patch)
treeb0cf5a56407fe3417294829cefa9f439b3fa3e26 /src
parentc15a36003dd3213deeae6163ec53c6344dd28683 (diff)
Made secret input more secretive (word-select does not work and
it sets X selection to '*' instead of leaving it unchanged) git-svn-id: file:///fltk/svn/fltk/trunk@348 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src')
-rw-r--r--src/Fl_Input_.cxx13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/Fl_Input_.cxx b/src/Fl_Input_.cxx
index a1899261c..68a6b4466 100644
--- a/src/Fl_Input_.cxx
+++ b/src/Fl_Input_.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_Input_.cxx,v 1.18 1999/02/26 07:07:56 bill Exp $"
+// "$Id: Fl_Input_.cxx,v 1.19 1999/03/01 03:44:30 bill Exp $"
//
// Common input widget routines for the Fast Light Tool Kit (FLTK).
//
@@ -369,7 +369,7 @@ void Fl_Input_::handle_mouse(int X, int Y,
if (newpos < size()) newpos++;
else newmark--;
}
- if (Fl::event_clicks()>1) {
+ if (Fl::event_clicks()>1 || type()==FL_SECRET_INPUT) {
while (!lineboundary(newpos)) newpos++;
while (!lineboundary(newmark)) newmark--;
} else {
@@ -377,7 +377,7 @@ void Fl_Input_::handle_mouse(int X, int Y,
while (!wordboundary(newmark)) newmark--;
}
} else {
- if (Fl::event_clicks()>1) {
+ if (Fl::event_clicks()>1 || type()==FL_SECRET_INPUT) {
while (!lineboundary(newpos)) newpos--;
} else {
while (!wordboundary(newpos)) newpos--;
@@ -436,7 +436,10 @@ int Fl_Input_::copy() {
} else {
e = position(); b = mark();
}
- if (type()!=FL_SECRET_INPUT) Fl::selection(*this, value()+b, e-b);
+ if (type()!=FL_SECRET_INPUT)
+ Fl::selection(*this, value()+b, e-b);
+ else
+ Fl::selection(*this, "*", 1);
return 1;
}
return 0;
@@ -733,5 +736,5 @@ Fl_Input_::~Fl_Input_() {
}
//
-// End of "$Id: Fl_Input_.cxx,v 1.18 1999/02/26 07:07:56 bill Exp $".
+// End of "$Id: Fl_Input_.cxx,v 1.19 1999/03/01 03:44:30 bill Exp $".
//