From fcb49a7b139aaa5a0509c1718c107b372839cf47 Mon Sep 17 00:00:00 2001 From: Matthias Melcher Date: Thu, 26 Dec 2002 01:15:32 +0000 Subject: 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 --- src/Fl_Text_Display.cxx | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src') 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 $". // -- cgit v1.2.3