summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Fl.cxx5
-rw-r--r--src/Fl_Input.cxx22
2 files changed, 11 insertions, 16 deletions
diff --git a/src/Fl.cxx b/src/Fl.cxx
index 9543bf3a3..73fa187bb 100644
--- a/src/Fl.cxx
+++ b/src/Fl.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: Fl.cxx,v 1.24.2.24 2000/06/05 21:20:46 mike Exp $"
+// "$Id: Fl.cxx,v 1.24.2.25 2000/06/10 21:30:59 bill Exp $"
//
// Main event handling code for the Fast Light Tool Kit (FLTK).
//
@@ -321,6 +321,7 @@ void Fl::focus(Fl_Widget *o) {
if (grab()) return; // don't do anything while grab is on
Fl_Widget *p = focus_;
if (o != p) {
+ Fl::compose_reset();
focus_ = o;
fl_oldfocus = 0;
for (; p && !p->contains(o); p = p->parent()) {
@@ -720,5 +721,5 @@ void Fl_Window::flush() {
}
//
-// End of "$Id: Fl.cxx,v 1.24.2.24 2000/06/05 21:20:46 mike Exp $".
+// End of "$Id: Fl.cxx,v 1.24.2.25 2000/06/10 21:30:59 bill Exp $".
//
diff --git a/src/Fl_Input.cxx b/src/Fl_Input.cxx
index fd8068a73..3e6194982 100644
--- a/src/Fl_Input.cxx
+++ b/src/Fl_Input.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_Input.cxx,v 1.10.2.10 2000/06/05 21:20:52 mike Exp $"
+// "$Id: Fl_Input.cxx,v 1.10.2.11 2000/06/10 21:31:00 bill Exp $"
//
// Input widget for the Fast Light Tool Kit (FLTK).
//
@@ -112,16 +112,12 @@ int Fl_Input::handle_key() {
else
return 0; // reserved for shortcuts
case FL_Tab:
- if (Fl::event_state(FL_CTRL) || type()!=FL_MULTILINE_INPUT) return 0;
+ if (Fl::event_state(FL_CTRL|FL_SHIFT) || type()!=FL_MULTILINE_INPUT) return 0;
return replace(position(), mark(), &ascii, 1);
- default:
- if (!ascii) return 0; // don't reset compose on shift keys
}
- Fl::compose_reset();
-
int i;
- switch(ascii) {
+ switch (ascii) {
case ctrl('A'):
if (type() == FL_MULTILINE_INPUT)
for (i=position(); i && index(i-1)!='\n'; i--) ;
@@ -189,7 +185,7 @@ int Fl_Input::handle_key() {
case ctrl('L'):
case ctrl('M'):
// insert a few selected control characters literally:
- if (type() != FL_FLOAT_INPUT || type() != FL_INT_INPUT)
+ if (type() != FL_FLOAT_INPUT && type() != FL_INT_INPUT)
return replace(position(), mark(), &ascii, 1);
}
@@ -218,13 +214,12 @@ int Fl_Input::handle(int event) {
case 0xfe20: // XK_ISO_Left_Tab
position(size(),0);
break;
+ default:
+ position(position(),mark());// turns off the saved up/down arrow position
+ break;
}
break;
- case FL_UNFOCUS:
- Fl::compose_reset();
- break;
-
case FL_KEYBOARD:
return handle_key();
@@ -240,7 +235,6 @@ int Fl_Input::handle(int event) {
}
#endif
}
- Fl::compose_reset();
break;
case FL_RELEASE:
@@ -265,5 +259,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.10 2000/06/05 21:20:52 mike Exp $".
+// End of "$Id: Fl_Input.cxx,v 1.10.2.11 2000/06/10 21:31:00 bill Exp $".
//