dpyinfo->mouse_face_end_row = dpyinfo->mouse_face_end_col = -1;
dpyinfo->mouse_face_window = Qnil;
}
+
+/* Just discard the mouse face information for frame F, if any.
+ This is used when the size of F is changed. */
+
+cancel_mouse_face (f)
+ FRAME_PTR f;
+{
+ Lisp_Object window;
+ struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
+
+ window = dpyinfo->mouse_face_window;
+ if (! NILP (window) && XFRAME (XWINDOW (window)->frame) == f)
+ {
+ dpyinfo->mouse_face_beg_row = dpyinfo->mouse_face_beg_col = -1;
+ dpyinfo->mouse_face_end_row = dpyinfo->mouse_face_end_col = -1;
+ dpyinfo->mouse_face_window = Qnil;
+ }
+}
\f
static struct scroll_bar *x_window_to_scroll_bar ();
static void x_scroll_bar_report_motion ();
{
change_frame_size (f, rows, columns, 0, 1);
SET_FRAME_GARBAGED (f);
+ cancel_mouse_face (f);
}
#endif
{
int pixelwidth, pixelheight;
int mask;
- Lisp_Object window;
struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
BLOCK_INPUT;
since it might be in a place that's outside the new frame size.
Actually checking whether it is outside is a pain in the neck,
so don't try--just let the highlighting be done afresh with new size. */
- window = dpyinfo->mouse_face_window;
- if (! NILP (window) && XFRAME (window) == f)
- {
- dpyinfo->mouse_face_beg_row = dpyinfo->mouse_face_beg_col = -1;
- dpyinfo->mouse_face_end_row = dpyinfo->mouse_face_end_col = -1;
- dpyinfo->mouse_face_window = Qnil;
- }
+ cancel_mouse_face (f);
UNBLOCK_INPUT;
}