Send FL_LEAVE events before FL_ENTER events.

Only change the cursor when the widget is activated.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2559 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Michael R Sweet 2002-07-30 18:40:50 +00:00
parent 9456baab50
commit 7038a9eeae
5 changed files with 20 additions and 16 deletions

View File

@ -1,6 +1,8 @@
CHANGES IN FLTK 1.1.0 CHANGES IN FLTK 1.1.0
- Documentation updates. - Documentation updates.
- Fl_Group would send FL_ENTER events before FL_LEAVE
events, causing problems with adjacent widgets.
- Fixed filename problems with Fl_File_Chooser - - Fixed filename problems with Fl_File_Chooser -
changing the filename field directly or choosing files changing the filename field directly or choosing files
from the root directory could yield interesting from the root directory could yield interesting

View File

@ -1,5 +1,5 @@
// //
// "$Id: Fl_File_Input.cxx,v 1.1.2.4 2002/07/30 18:10:03 easysw Exp $" // "$Id: Fl_File_Input.cxx,v 1.1.2.5 2002/07/30 18:40:50 easysw Exp $"
// //
// File_Input header file for the Fast Light Tool Kit (FLTK). // File_Input header file for the Fast Light Tool Kit (FLTK).
// //
@ -183,8 +183,10 @@ Fl_File_Input::handle(int event) // I - Event
switch (event) { switch (event) {
case FL_MOVE : case FL_MOVE :
case FL_ENTER : case FL_ENTER :
if (Fl::event_y() < (y() + DIR_HEIGHT)) fl_cursor(FL_CURSOR_DEFAULT); if (active_r()) {
else fl_cursor(FL_CURSOR_INSERT); if (Fl::event_y() < (y() + DIR_HEIGHT)) fl_cursor(FL_CURSOR_DEFAULT);
else fl_cursor(FL_CURSOR_INSERT);
}
return 1; return 1;
@ -268,5 +270,5 @@ Fl_File_Input::handle_button(int event) // I - Event
// //
// End of "$Id: Fl_File_Input.cxx,v 1.1.2.4 2002/07/30 18:10:03 easysw Exp $". // End of "$Id: Fl_File_Input.cxx,v 1.1.2.5 2002/07/30 18:40:50 easysw Exp $".
// //

View File

@ -1,5 +1,5 @@
// //
// "$Id: Fl_Group.cxx,v 1.8.2.8.2.16 2002/07/14 17:03:31 easysw Exp $" // "$Id: Fl_Group.cxx,v 1.8.2.8.2.17 2002/07/30 18:40:50 easysw Exp $"
// //
// Group widget for the Fast Light Tool Kit (FLTK). // Group widget for the Fast Light Tool Kit (FLTK).
// //
@ -168,9 +168,9 @@ int Fl_Group::handle(int event) {
if (o->visible() && Fl::event_inside(o)) { if (o->visible() && Fl::event_inside(o)) {
if (o->contains(Fl::belowmouse())) { if (o->contains(Fl::belowmouse())) {
return send(o,FL_MOVE); return send(o,FL_MOVE);
} else if (send(o,FL_ENTER)) { } else {
if (!o->contains(Fl::belowmouse())) Fl::belowmouse(o); if (!o->contains(Fl::belowmouse())) Fl::belowmouse(o);
return 1; if (send(o,FL_ENTER)) return 1;
} }
} }
} }
@ -587,5 +587,5 @@ void Fl_Group::draw_outside_label(const Fl_Widget& w) const {
} }
// //
// End of "$Id: Fl_Group.cxx,v 1.8.2.8.2.16 2002/07/14 17:03:31 easysw Exp $". // End of "$Id: Fl_Group.cxx,v 1.8.2.8.2.17 2002/07/30 18:40:50 easysw Exp $".
// //

View File

@ -1,5 +1,5 @@
// //
// "$Id: Fl_Input_.cxx,v 1.21.2.11.2.18 2002/07/30 18:10:03 easysw Exp $" // "$Id: Fl_Input_.cxx,v 1.21.2.11.2.19 2002/07/30 18:40:50 easysw Exp $"
// //
// Common input widget routines for the Fast Light Tool Kit (FLTK). // Common input widget routines for the Fast Light Tool Kit (FLTK).
// //
@ -653,11 +653,11 @@ int Fl_Input_::handletext(int event, int X, int Y, int W, int H) {
switch (event) { switch (event) {
case FL_ENTER: case FL_ENTER:
fl_cursor(FL_CURSOR_INSERT); if (active_r()) fl_cursor(FL_CURSOR_INSERT);
return 1; return 1;
case FL_LEAVE: case FL_LEAVE:
fl_cursor(FL_CURSOR_DEFAULT); if (active_r()) fl_cursor(FL_CURSOR_DEFAULT);
return 1; return 1;
case FL_FOCUS: case FL_FOCUS:
@ -848,5 +848,5 @@ Fl_Input_::~Fl_Input_() {
} }
// //
// End of "$Id: Fl_Input_.cxx,v 1.21.2.11.2.18 2002/07/30 18:10:03 easysw Exp $". // End of "$Id: Fl_Input_.cxx,v 1.21.2.11.2.19 2002/07/30 18:40:50 easysw Exp $".
// //

View File

@ -1,5 +1,5 @@
// //
// "$Id: Fl_Text_Display.cxx,v 1.12.2.22 2002/07/30 15:10:32 easysw Exp $" // "$Id: Fl_Text_Display.cxx,v 1.12.2.23 2002/07/30 18:40:50 easysw Exp $"
// //
// Copyright 2001-2002 by Bill Spitzak and others. // Copyright 2001-2002 by Bill Spitzak and others.
// Original code Copyright Mark Edel. Permission to distribute under // Original code Copyright Mark Edel. Permission to distribute under
@ -1892,11 +1892,11 @@ int Fl_Text_Display::handle(int event) {
switch (event) { switch (event) {
case FL_ENTER: case FL_ENTER:
fl_cursor(FL_CURSOR_INSERT); if (active_r()) fl_cursor(FL_CURSOR_INSERT);
return 1; return 1;
case FL_LEAVE: case FL_LEAVE:
fl_cursor(FL_CURSOR_DEFAULT); if (active_r()) fl_cursor(FL_CURSOR_DEFAULT);
return 1; return 1;
case FL_PUSH: { case FL_PUSH: {
@ -1962,5 +1962,5 @@ int Fl_Text_Display::handle(int event) {
// //
// End of "$Id: Fl_Text_Display.cxx,v 1.12.2.22 2002/07/30 15:10:32 easysw Exp $". // End of "$Id: Fl_Text_Display.cxx,v 1.12.2.23 2002/07/30 18:40:50 easysw Exp $".
// //