diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/Fl_Input.cxx | 9 | ||||
| -rw-r--r-- | src/Fl_Input_.cxx | 5 | ||||
| -rw-r--r-- | src/Fl_Text_Display.cxx | 11 | ||||
| -rw-r--r-- | src/Fl_Text_Editor.cxx | 4 |
4 files changed, 23 insertions, 6 deletions
diff --git a/src/Fl_Input.cxx b/src/Fl_Input.cxx index ef12c7487..30a198d0d 100644 --- a/src/Fl_Input.cxx +++ b/src/Fl_Input.cxx @@ -3,7 +3,7 @@ // // Input widget for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2005 by Bill Spitzak and others. +// Copyright 1998-2006 by Bill Spitzak and others. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -34,6 +34,7 @@ #include <stdio.h> #include <stdlib.h> #include <FL/Fl.H> +#include <FL/Fl_Window.H> #include <FL/Fl_Input.H> #include <FL/fl_draw.H> #include <FL/fl_ask.H> @@ -348,7 +349,11 @@ int Fl_Input::handle(int event) { else position(position()); return (1); - } else return handle_key(); + } else { + if (active_r() && window()) window()->cursor(FL_CURSOR_NONE); + + return handle_key(); + } case FL_PUSH: if (Fl::dnd_text_ops()) { diff --git a/src/Fl_Input_.cxx b/src/Fl_Input_.cxx index 26d586105..fcb552513 100644 --- a/src/Fl_Input_.cxx +++ b/src/Fl_Input_.cxx @@ -3,7 +3,7 @@ // // Common input widget routines for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2005 by Bill Spitzak and others. +// Copyright 1998-2006 by Bill Spitzak and others. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -693,6 +693,7 @@ int Fl_Input_::handletext(int event, int X, int Y, int W, int H) { switch (event) { case FL_ENTER: + case FL_MOVE: if (active_r() && window()) window()->cursor(FL_CURSOR_INSERT); return 1; @@ -717,6 +718,8 @@ int Fl_Input_::handletext(int event, int X, int Y, int W, int H) { return 1; case FL_PUSH: + if (active_r() && window()) window()->cursor(FL_CURSOR_INSERT); + handle_mouse(X, Y, W, H, Fl::event_state(FL_SHIFT)); if (Fl::focus() != this) { diff --git a/src/Fl_Text_Display.cxx b/src/Fl_Text_Display.cxx index a38cd9774..add984cad 100644 --- a/src/Fl_Text_Display.cxx +++ b/src/Fl_Text_Display.cxx @@ -1,7 +1,7 @@ // // "$Id$" // -// Copyright 2001-2005 by Bill Spitzak and others. +// Copyright 2001-2006 by Bill Spitzak and others. // Original code Copyright Mark Edel. Permission to distribute under // the LGPL for the FLTK library granted by Mark Edel. // @@ -3100,7 +3100,8 @@ int Fl_Text_Display::handle(int event) { case FL_ENTER: case FL_MOVE: if (active_r()) { - if (Fl::event_inside(text_area.x, text_area.y, text_area.w, text_area.h)) window()->cursor(FL_CURSOR_INSERT); + if (Fl::event_inside(text_area.x, text_area.y, text_area.w, + text_area.h)) window()->cursor(FL_CURSOR_INSERT); else window()->cursor(FL_CURSOR_DEFAULT); return 1; } else { @@ -3118,6 +3119,12 @@ int Fl_Text_Display::handle(int event) { } case FL_PUSH: { + if (active_r() && window()) { + if (Fl::event_inside(text_area.x, text_area.y, text_area.w, + text_area.h)) window()->cursor(FL_CURSOR_INSERT); + else window()->cursor(FL_CURSOR_DEFAULT); + } + if (Fl::focus() != this) { Fl::focus(this); handle(FL_FOCUS); diff --git a/src/Fl_Text_Editor.cxx b/src/Fl_Text_Editor.cxx index 291753d9c..745490e0f 100644 --- a/src/Fl_Text_Editor.cxx +++ b/src/Fl_Text_Editor.cxx @@ -1,7 +1,7 @@ // // "$Id$" // -// Copyright 2001-2005 by Bill Spitzak and others. +// Copyright 2001-2006 by Bill Spitzak and others. // Original code Copyright Mark Edel. Permission to distribute under // the LGPL for the FLTK library granted by Mark Edel. // @@ -30,6 +30,7 @@ #include "flstring.h" #include <ctype.h> #include <FL/Fl.H> +#include <FL/Fl_Window.H> #include <FL/Fl_Text_Editor.H> #include <FL/fl_ask.H> @@ -446,6 +447,7 @@ int Fl_Text_Editor::handle(int event) { return 1; case FL_KEYBOARD: + if (active_r() && window()) window()->cursor(FL_CURSOR_NONE); return handle_key(); case FL_PASTE: |
