summaryrefslogtreecommitdiff
path: root/src/Fl_Text_Display.cxx
diff options
context:
space:
mode:
authorMatthias Melcher <fltk@matthiasm.com>2002-12-26 01:15:32 +0000
committerMatthias Melcher <fltk@matthiasm.com>2002-12-26 01:15:32 +0000
commitfcb49a7b139aaa5a0509c1718c107b372839cf47 (patch)
tree6be0fd6c1ef0bf0403bc8722088a1d66b789c5f9 /src/Fl_Text_Display.cxx
parenta81ea6a412d844fd8af5b007402320f10b20fa29 (diff)
Fl_Text_Display/Editor would not receive FL_FOCUS events on mouse clicks
which resulted in not showing the insertion cursor. Fluid would not register changes to Fl_Text_Editor widgets unless Enter was pressed. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2885 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_Text_Display.cxx')
-rw-r--r--src/Fl_Text_Display.cxx9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/Fl_Text_Display.cxx b/src/Fl_Text_Display.cxx
index 0b77ea2e2..e95cc391b 100644
--- a/src/Fl_Text_Display.cxx
+++ b/src/Fl_Text_Display.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_Text_Display.cxx,v 1.12.2.39 2002/11/19 16:45:32 easysw Exp $"
+// "$Id: Fl_Text_Display.cxx,v 1.12.2.40 2002/12/26 01:15:32 matthiaswm Exp $"
//
// Copyright 2001-2002 by Bill Spitzak and others.
// Original code Copyright Mark Edel. Permission to distribute under
@@ -2973,7 +2973,10 @@ int Fl_Text_Display::handle(int event) {
}
case FL_PUSH: {
- Fl::focus(this); // Take focus from any child widgets...
+ if (Fl::focus() != this) {
+ Fl::focus(this);
+ handle(FL_FOCUS);
+ }
if (Fl::event_state()&FL_SHIFT) return handle(FL_DRAG);
dragging = 1;
int pos = xy_to_position(Fl::event_x(), Fl::event_y(), CURSOR_POS);
@@ -3035,5 +3038,5 @@ int Fl_Text_Display::handle(int event) {
//
-// End of "$Id: Fl_Text_Display.cxx,v 1.12.2.39 2002/11/19 16:45:32 easysw Exp $".
+// End of "$Id: Fl_Text_Display.cxx,v 1.12.2.40 2002/12/26 01:15:32 matthiaswm Exp $".
//