+ Lisp_Object win, corpore, sano;
+ struct window_mirror *mirror;
+ int mene, _mene, tekel, upharsin;
+ Bufpos mens, sana;
+ Charcount in;
+ struct window *needle_in_haystack = 0;
+ POINT donde_esta;
+
+ donde_esta.x = where.x;
+ donde_esta.y = where.y;
+
+ /* Find the window to scroll */
+
+ /* The mouse event could actually occur outside of the emacs
+ frame. */
+ if (ScreenToClient (FRAME_MSWINDOWS_HANDLE (XFRAME (frame)),
+ &donde_esta) != 0)
+ {
+ /* stderr_out ("donde_esta: %d %d\n", donde_esta.x, donde_esta.y); */
+ pixel_to_glyph_translation (XFRAME (frame), donde_esta.x, donde_esta.y,
+ &mene, &_mene, &tekel, &upharsin,
+ &needle_in_haystack,
+ &mens, &sana, &in, &corpore, &sano);
+
+ if (needle_in_haystack)
+ {
+ XSETWINDOW (win, needle_in_haystack);
+ /* stderr_out ("found needle\n");
+ debug_print (win); */
+ }
+ }
+
+ if (!needle_in_haystack)
+ {
+ win = FRAME_SELECTED_WINDOW (XFRAME (frame));
+ needle_in_haystack = XWINDOW (win);
+ }