summaryrefslogtreecommitdiff
path: root/src/Fl.cxx
diff options
context:
space:
mode:
authorBill Spitzak <spitzak@gmail.com>2002-05-14 15:24:03 +0000
committerBill Spitzak <spitzak@gmail.com>2002-05-14 15:24:03 +0000
commit76b185b33e89ab3db5c404f32dd62879ab17a8c4 (patch)
tree0d6bc08436f65945d6e558e5784d4823d1292cf3 /src/Fl.cxx
parent7a455a05c64d74ebf5509c79f40715dbdcdc8a29 (diff)
Clicking on tooltips makes them go away and they don't reappear.
Tooltips do not appear when widgets are entered for reasons other than the mouse moving (ie like when an overlaying window disappears) Possible fix for WIN32 titlebar color when tooltip is instantly displayed for a new widget (untested). Recursion problem in DnD fixed (caused a drag inside the same program to paste many times into where you dropped). Tested only on X but this bug may be X-only. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2220 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl.cxx')
-rw-r--r--src/Fl.cxx25
1 files changed, 15 insertions, 10 deletions
diff --git a/src/Fl.cxx b/src/Fl.cxx
index c7fd27136..949107ee7 100644
--- a/src/Fl.cxx
+++ b/src/Fl.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: Fl.cxx,v 1.24.2.41.2.28 2002/05/13 15:43:09 easysw Exp $"
+// "$Id: Fl.cxx,v 1.24.2.41.2.29 2002/05/14 15:24:02 spitzak Exp $"
//
// Main event handling code for the Fast Light Tool Kit (FLTK).
//
@@ -424,7 +424,6 @@ void Fl::belowmouse(Fl_Widget *o) {
Fl_Widget *p = belowmouse_;
if (o != p) {
belowmouse_ = o;
- if (!dnd_flag) Fl_Tooltip::enter(o);
for (; p && !p->contains(o); p = p->parent()) {
p->handle(dnd_flag ? FL_DND_LEAVE : FL_LEAVE);
}
@@ -468,15 +467,15 @@ void fl_fix_focus() {
} else
Fl::focus(0);
- if (!Fl::pushed()) {
+ if (!(Fl::event_state() & 0x7f00000 /*FL_BUTTONS*/)) {
// set belowmouse based on Fl::modal() and fl_xmousewin:
w = fl_xmousewin;
if (w) {
if (Fl::modal()) w = Fl::modal();
if (!w->contains(Fl::belowmouse())) {
- Fl::belowmouse(w);
w->handle(FL_ENTER);
+ if (!w->contains(Fl::belowmouse())) Fl::belowmouse(w);
} else {
// send a FL_MOVE event so the enter/leave state is up to date
Fl::e_x = Fl::e_x_root-fl_xmousewin->x();
@@ -485,6 +484,7 @@ void fl_fix_focus() {
}
} else {
Fl::belowmouse(0);
+ Fl_Tooltip::enter(0);
}
}
}
@@ -534,9 +534,10 @@ static int send(int event, Fl_Widget* to, Fl_Window* window) {
int Fl::handle(int event, Fl_Window* window)
{
- Fl_Widget* w = window;
-
e_number = event;
+ if (fl_local_grab) return fl_local_grab(event);
+
+ Fl_Widget* w = window;
switch (event) {
@@ -648,6 +649,7 @@ int Fl::handle(int event, Fl_Window* window)
case FL_ENTER:
fl_xmousewin = window;
fl_fix_focus();
+ Fl_Tooltip::enter(belowmouse());
return 1;
case FL_LEAVE:
@@ -663,10 +665,13 @@ int Fl::handle(int event, Fl_Window* window)
default:
break;
}
- if (w && send(event, w, window)) return 1;
- int ret = send_handlers(event);
+ if (w && send(event, w, window)) {
+ dnd_flag = 0;
+ if (event == FL_MOVE) Fl_Tooltip::enter(belowmouse());
+ return 1;
+ }
dnd_flag = 0;
- return ret;
+ return send_handlers(event);
}
////////////////////////////////////////////////////////////////
@@ -892,5 +897,5 @@ void Fl_Window::flush() {
}
//
-// End of "$Id: Fl.cxx,v 1.24.2.41.2.28 2002/05/13 15:43:09 easysw Exp $".
+// End of "$Id: Fl.cxx,v 1.24.2.41.2.29 2002/05/14 15:24:02 spitzak Exp $".
//