diff options
| author | Michael R Sweet <michael.r.sweet@gmail.com> | 2001-08-02 15:32:00 +0000 |
|---|---|---|
| committer | Michael R Sweet <michael.r.sweet@gmail.com> | 2001-08-02 15:32:00 +0000 |
| commit | 836d2fac260c861106e0d96203bea4a04c9dd2d2 (patch) | |
| tree | e265f4eab743fc350dac1af4394fe88440c7181c /src/Fl.cxx | |
| parent | bd069130577e28b3b26dbb5637bb3172fe108e81 (diff) | |
Fix tooltips a la 2.0.
Update 1.1 tooltip interface to be identical to the 2.0 interface for
most things (no enter_area function right now...)
Add localized makedepend files (no system include files, just ../FL/bla.h)
so that builds recompile as necessary.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@1516 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl.cxx')
| -rw-r--r-- | src/Fl.cxx | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/Fl.cxx b/src/Fl.cxx index b973d1748..86a2416f3 100644 --- a/src/Fl.cxx +++ b/src/Fl.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl.cxx,v 1.24.2.41.2.1 2001/08/01 21:24:49 easysw Exp $" +// "$Id: Fl.cxx,v 1.24.2.41.2.2 2001/08/02 15:31:59 easysw Exp $" // // Main event handling code for the Fast Light Tool Kit (FLTK). // @@ -26,6 +26,7 @@ #include <FL/Fl.H> #include <FL/Fl_Window.H> #include <FL/x.H> +#include <FL/Fl_Tooltip.H> #include <ctype.h> #include <stdlib.h> #include <string.h> @@ -149,7 +150,7 @@ void Fl::remove_timeout(Fl_Timeout_Handler cb, void *arg) { // This may change in the future. for (Timeout** p = &first_timeout; *p;) { Timeout* t = *p; - if (t->cb == cb && t->arg == arg) { + if (t->cb == cb && (t->arg == arg || !arg)) { *p = t->next; t->next = free_timeout; free_timeout = t; @@ -388,6 +389,7 @@ void Fl::focus(Fl_Widget *o) { void Fl::belowmouse(Fl_Widget *o) { if (grab()) return; // don't do anything while grab is on + Fl_Tooltip::enter(o); Fl_Widget *p = belowmouse_; if (o != p) { belowmouse_ = o; @@ -469,6 +471,7 @@ void fl_throw_focus(Fl_Widget *o) { if (o->contains(Fl::focus())) Fl::focus_ = 0; if (o == fl_xfocus) fl_xfocus = 0; if (o == fl_xmousewin) fl_xmousewin = 0; + Fl_Tooltip::exit(o); fl_fix_focus(); } @@ -510,6 +513,7 @@ int Fl::handle(int event, Fl_Window* window) return 1; case FL_PUSH: + if (!pushed()) Fl_Tooltip::enter(0); if (grab()) w = grab(); else if (modal() && w != modal()) return 0; pushed_ = w; @@ -548,6 +552,8 @@ int Fl::handle(int event, Fl_Window* window) return 1; case FL_KEYBOARD: + Fl_Tooltip::enter((Fl_Widget*)0); + fl_xfocus = window; // this should not happen! But maybe it does: // Try it as keystroke, sending it to focus and all parents: @@ -565,6 +571,7 @@ int Fl::handle(int event, Fl_Window* window) event = FL_SHORTCUT; case FL_SHORTCUT: + Fl_Tooltip::enter((Fl_Widget*)0); if (grab()) {w = grab(); break;} // send it to grab window @@ -605,7 +612,6 @@ int Fl::handle(int event, Fl_Window* window) void Fl_Window::hide() { clear_visible(); - Fl_Tooltip::exit(this); if (!shown()) return; @@ -782,5 +788,5 @@ void Fl_Window::flush() { } // -// End of "$Id: Fl.cxx,v 1.24.2.41.2.1 2001/08/01 21:24:49 easysw Exp $". +// End of "$Id: Fl.cxx,v 1.24.2.41.2.2 2001/08/02 15:31:59 easysw Exp $". // |
