Fl::below_mouse() was incorrectly clearing e_is_click; this prevented

any double-clicks from getting through...


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.0@1329 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Michael R Sweet 2000-11-20 02:49:40 +00:00
parent 739e9411e7
commit 41df4bf0d1
2 changed files with 9 additions and 8 deletions

View File

@ -1,5 +1,5 @@
// //
// "$Id: Fl.cxx,v 1.24.2.32 2000/10/21 20:01:55 spitzak Exp $" // "$Id: Fl.cxx,v 1.24.2.33 2000/11/20 02:49:40 easysw Exp $"
// //
// Main event handling code for the Fast Light Tool Kit (FLTK). // Main event handling code for the Fast Light Tool Kit (FLTK).
// //
@ -30,6 +30,7 @@
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
// //
// Globals... // Globals...
// //
@ -343,7 +344,6 @@ void Fl::belowmouse(Fl_Widget *o) {
if (grab()) return; // don't do anything while grab is on if (grab()) return; // don't do anything while grab is on
Fl_Widget *p = belowmouse_; Fl_Widget *p = belowmouse_;
if (o != p) { if (o != p) {
event_is_click(0);
belowmouse_ = o; belowmouse_ = o;
for (; p && !p->contains(o); p = p->parent()) p->handle(FL_LEAVE); for (; p && !p->contains(o); p = p->parent()) p->handle(FL_LEAVE);
} }
@ -734,5 +734,5 @@ void Fl_Window::flush() {
} }
// //
// End of "$Id: Fl.cxx,v 1.24.2.32 2000/10/21 20:01:55 spitzak Exp $". // End of "$Id: Fl.cxx,v 1.24.2.33 2000/11/20 02:49:40 easysw Exp $".
// //

View File

@ -1,5 +1,5 @@
// //
// "$Id: Fl_x.cxx,v 1.24.2.20 2000/10/21 20:01:56 spitzak Exp $" // "$Id: Fl_x.cxx,v 1.24.2.21 2000/11/20 02:49:40 easysw Exp $"
// //
// X specific code for the Fast Light Tool Kit (FLTK). // X specific code for the Fast Light Tool Kit (FLTK).
// //
@ -340,8 +340,8 @@ static void set_event_xy() {
if (fl_key_vector[18]&0x18) Fl::e_state |= FL_META; if (fl_key_vector[18]&0x18) Fl::e_state |= FL_META;
#endif #endif
// turn off is_click if enough time or mouse movement has passed: // turn off is_click if enough time or mouse movement has passed:
if (abs(Fl::e_x_root-px)+abs(Fl::e_y_root-py) > 3 if (abs(Fl::e_x_root-px)+abs(Fl::e_y_root-py) > 3 ||
|| fl_event_time >= ptime+1000) fl_event_time >= ptime+1000)
Fl::e_is_click = 0; Fl::e_is_click = 0;
} }
@ -520,7 +520,8 @@ int fl_handle(const XEvent& xevent)
Fl::e_keysym = int(keysym); Fl::e_keysym = int(keysym);
Fl::e_text = buffer; Fl::e_text = buffer;
Fl::e_length = len; Fl::e_length = len;
set_event_xy(); Fl::e_is_click = 0; set_event_xy();
Fl::e_is_click = 0;
if (Fl::event_state(FL_CTRL) && keysym == '-') buffer[0] = 0x1f; // ^_ if (Fl::event_state(FL_CTRL) && keysym == '-') buffer[0] = 0x1f; // ^_
event = FL_KEYBOARD; event = FL_KEYBOARD;
break;} break;}
@ -897,5 +898,5 @@ void Fl_Window::make_current() {
#endif #endif
// //
// End of "$Id: Fl_x.cxx,v 1.24.2.20 2000/10/21 20:01:56 spitzak Exp $". // End of "$Id: Fl_x.cxx,v 1.24.2.21 2000/11/20 02:49:40 easysw Exp $".
// //