summaryrefslogtreecommitdiff
path: root/src/Fl.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'src/Fl.cxx')
-rw-r--r--src/Fl.cxx8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/Fl.cxx b/src/Fl.cxx
index d90600402..58a55aac0 100644
--- a/src/Fl.cxx
+++ b/src/Fl.cxx
@@ -757,9 +757,11 @@ int Fl::handle(int e, Fl_Window* window)
case FL_MOUSEWHEEL:
fl_xfocus = window; // this should not happen! But maybe it does:
- // Try it as keystroke, sending it to focus and all parents:
- for (wi = grab() ? grab() : focus(); wi; wi = wi->parent())
- if (send(FL_MOUSEWHEEL, wi, window)) return 1;
+ // Try sending it to the grab and then the window:
+ if (grab()) {
+ if (send(FL_MOUSEWHEEL, grab(), window)) return 1;
+ }
+ if (send(FL_MOUSEWHEEL, window, window)) return 1;
default:
break;
}