X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/d3499758a9e5912ee6f47a70abc22b579380f11a..9d74382f6f75aafbd7eab700107bb1e31f640c8a:/src/w32term.c diff --git a/src/w32term.c b/src/w32term.c index 7d530e7ea6..2b5c9da39b 100644 --- a/src/w32term.c +++ b/src/w32term.c @@ -3131,8 +3131,10 @@ construct_mouse_wheel (result, msg, f) result->modifiers = (msg->dwModifiers | ((delta < 0 ) ? down_modifier : up_modifier)); - p.x = LOWORD (msg->msg.lParam); - p.y = HIWORD (msg->msg.lParam); + /* With multiple monitors, we can legitimately get negative + coordinates, so cast to short to interpret them correctly. */ + p.x = (short) LOWORD (msg->msg.lParam); + p.y = (short) HIWORD (msg->msg.lParam); ScreenToClient (msg->msg.hwnd, &p); XSETINT (result->x, p.x); XSETINT (result->y, p.y); @@ -4260,7 +4262,8 @@ w32_read_socket (sd, expected, hold_quit) if (f && !f->iconified) { - if (!dpyinfo->mouse_face_hidden && INTEGERP (Vmouse_highlight)) + if (!dpyinfo->mouse_face_hidden && INTEGERP (Vmouse_highlight) + && !EQ (f->tool_bar_window, dpyinfo->mouse_face_window)) { clear_mouse_face (dpyinfo); dpyinfo->mouse_face_hidden = 1; @@ -4283,7 +4286,8 @@ w32_read_socket (sd, expected, hold_quit) if (f && !f->iconified) { - if (!dpyinfo->mouse_face_hidden && INTEGERP (Vmouse_highlight)) + if (!dpyinfo->mouse_face_hidden && INTEGERP (Vmouse_highlight) + && !EQ (f->tool_bar_window, dpyinfo->mouse_face_window)) { clear_mouse_face (dpyinfo); dpyinfo->mouse_face_hidden = 1;