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
This commit is contained in:
Bill Spitzak 1999-03-01 03:44:30 +00:00
parent c15a36003d
commit 32291ad0d5

View File

@ -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). // 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++; if (newpos < size()) newpos++;
else newmark--; else newmark--;
} }
if (Fl::event_clicks()>1) { if (Fl::event_clicks()>1 || type()==FL_SECRET_INPUT) {
while (!lineboundary(newpos)) newpos++; while (!lineboundary(newpos)) newpos++;
while (!lineboundary(newmark)) newmark--; while (!lineboundary(newmark)) newmark--;
} else { } else {
@ -377,7 +377,7 @@ void Fl_Input_::handle_mouse(int X, int Y,
while (!wordboundary(newmark)) newmark--; while (!wordboundary(newmark)) newmark--;
} }
} else { } else {
if (Fl::event_clicks()>1) { if (Fl::event_clicks()>1 || type()==FL_SECRET_INPUT) {
while (!lineboundary(newpos)) newpos--; while (!lineboundary(newpos)) newpos--;
} else { } else {
while (!wordboundary(newpos)) newpos--; while (!wordboundary(newpos)) newpos--;
@ -436,7 +436,10 @@ int Fl_Input_::copy() {
} else { } else {
e = position(); b = mark(); 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 1;
} }
return 0; 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 $".
// //