* src/xterm.c (handle_one_xevent): Fix XI2 frame lookup to
handle foreign windows.
if (delta != DBL_MAX)
{
- f = mouse_or_wdesc_frame (dpyinfo, xev->event);
+ if (!f)
+ {
+ f = x_any_window_to_frame (dpyinfo, xev->event);
+
+ if (!f)
+ goto XI_OTHER;
+ }
+
scroll_unit = pow (FRAME_PIXEL_HEIGHT (f), 2.0 / 3.0);
found_valuator = true;
&& (fabs (val->emacs_value) < 1))
continue;
- if (!f)
- {
- f = x_any_window_to_frame (dpyinfo, xev->event);
-
- if (!f)
- goto XI_OTHER;
- }
-
bool s = signbit (val->emacs_value);
inev.ie.kind = (val->horizontal
? HORIZ_WHEEL_EVENT