diff options
| author | Michael R Sweet <michael.r.sweet@gmail.com> | 2004-09-12 20:26:23 +0000 |
|---|---|---|
| committer | Michael R Sweet <michael.r.sweet@gmail.com> | 2004-09-12 20:26:23 +0000 |
| commit | 70dd6151c1d16efc5d6214949266db0ccae0abfa (patch) | |
| tree | bb446f06f2121c7eee2a21ccda189a9683baedd5 /src/Fl.cxx | |
| parent | 35af1c00cc1bb903da2d7c9bc953a81f13553a12 (diff) | |
Tooltips would not reappear on the same widget, and the initial
tooltip delay was not used after a tooltip was shown (STR #465)
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@3822 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl.cxx')
| -rw-r--r-- | src/Fl.cxx | 38 |
1 files changed, 35 insertions, 3 deletions
diff --git a/src/Fl.cxx b/src/Fl.cxx index 00924a3f0..2ed58bada 100644 --- a/src/Fl.cxx +++ b/src/Fl.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl.cxx,v 1.24.2.41.2.67 2004/09/09 21:34:45 matthiaswm Exp $" +// "$Id: Fl.cxx,v 1.24.2.41.2.68 2004/09/12 20:26:23 easysw Exp $" // // Main event handling code for the Fast Light Tool Kit (FLTK). // @@ -36,6 +36,10 @@ #include <stdlib.h> #include "flstring.h" +#ifdef DEBUG +# include <stdio.h> +#endif // DEBUG + // // Globals... @@ -482,6 +486,9 @@ void (*Fl_Tooltip::exit)(Fl_Widget *) = nothing; // X says the focus or mouse window have changed. void fl_fix_focus() { +#ifdef DEBUG + puts("fl_fix_focus();"); +#endif // DEBUG if (Fl::grab()) return; // don't do anything while grab is on. @@ -535,6 +542,10 @@ extern Fl_Widget *fl_selection_requestor; // from Fl_x.cxx // desirable behavior and caused flwm to crash. void fl_throw_focus(Fl_Widget *o) { +#ifdef DEBUG + printf("fl_throw_focus(o=%p)\n", o); +#endif // DEBUG + if (o->contains(Fl::pushed())) Fl::pushed_ = 0; #ifndef WIN32 if (o->contains(fl_selection_requestor)) fl_selection_requestor = 0; @@ -594,6 +605,10 @@ int Fl::handle(int e, Fl_Window* window) return 1; case FL_PUSH: +#ifdef DEBUG + printf("Fl::handle(e=%d, window=%p);\n", e, window); +#endif // DEBUG + if (grab()) wi = grab(); else if (modal() && wi != modal()) return 0; pushed_ = wi; @@ -631,7 +646,12 @@ int Fl::handle(int e, Fl_Window* window) if (grab()) wi = grab(); {Fl_Widget* pbm = belowmouse(); int ret = (wi && send(e, wi, window)); - if (pbm != belowmouse()) Fl_Tooltip::enter(belowmouse()); + if (pbm != belowmouse()) { +#ifdef DEBUG + printf("Fl::handle(e=%d, window=%p);\n", e, window); +#endif // DEBUG + Fl_Tooltip::enter(belowmouse()); + } return ret;} case FL_RELEASE: { @@ -657,6 +677,10 @@ int Fl::handle(int e, Fl_Window* window) return 1; case FL_KEYBOARD: +#ifdef DEBUG + printf("Fl::handle(e=%d, window=%p);\n", e, window); +#endif // DEBUG + Fl_Tooltip::enter((Fl_Widget*)0); fl_xfocus = window; // this should not happen! But maybe it does: @@ -695,12 +719,20 @@ int Fl::handle(int e, Fl_Window* window) return 0; case FL_ENTER: +#ifdef DEBUG + printf("Fl::handle(e=%d, window=%p);\n", e, window); +#endif // DEBUG + fl_xmousewin = window; fl_fix_focus(); Fl_Tooltip::enter(belowmouse()); return 1; case FL_LEAVE: +#ifdef DEBUG + printf("Fl::handle(e=%d, window=%p);\n", e, window); +#endif // DEBUG + if (!pushed_) { belowmouse(0); Fl_Tooltip::enter(0); @@ -1020,5 +1052,5 @@ void Fl_Window::flush() { } // -// End of "$Id: Fl.cxx,v 1.24.2.41.2.67 2004/09/09 21:34:45 matthiaswm Exp $". +// End of "$Id: Fl.cxx,v 1.24.2.41.2.68 2004/09/12 20:26:23 easysw Exp $". // |
