{
struct frame *f = XFRAME (WINDOW_FRAME (w));
- block_input ();
-
/* Pseudo windows don't have cursors, so don't display them here. */
if (!w->pseudo_window_p)
{
+ block_input ();
if (cursor_on_p)
display_and_set_cursor (w, true,
else
gui_draw_vertical_border (w);
}
+ unblock_input ();
}
/* If a row with mouse-face was overwritten, arrange for
FRAME_RIF (f)->update_window_end_hook (w,
cursor_on_p,
mouse_face_overwritten_p);
- unblock_input ();
}
#endif /* HAVE_WINDOW_SYSTEM */
return 0;
#endif
+ /* Can't scroll the display of w32 GUI frames when position of point
+ is indicated by the system caret, because scrolling the display
+ will then "copy" the pixles used by the caret. */
+#ifdef HAVE_NTGUI
+ if (w32_use_visible_system_caret)
+ return 0;
+#endif
+
/* Give up if some rows in the desired matrix are not enabled. */
if (! MATRIX_ROW_ENABLED_P (desired_matrix, i))
return -1;
w32_update_window_begin (struct window *w)
{
/* Hide the system caret during an update. */
- if (w32_use_visible_system_caret && w32_system_caret_hwnd)
+ if (w32_use_visible_system_caret && w32_system_caret_hwnd
+ && w == w32_system_caret_window)
{
SendMessageTimeout (w32_system_caret_hwnd, WM_EMACS_HIDE_CARET, 0, 0,
0, 6000, NULL);
/* Unhide the caret. This won't actually show the cursor, unless it
was visible before the corresponding call to HideCaret in
w32_update_window_begin. */
- if (w32_use_visible_system_caret && w32_system_caret_hwnd)
+ if (w32_use_visible_system_caret && w32_system_caret_hwnd
+ && w == w32_system_caret_window)
{
SendMessageTimeout (w32_system_caret_hwnd, WM_EMACS_SHOW_CARET, 0, 0,
0, 6000, NULL);
if (!NILP (Vdisplay_line_numbers))
return false;
+ /* Can't scroll the display of w32 GUI frames when position of point
+ is indicated by the system caret, because scrolling the display
+ will then "copy" the pixles used by the caret. */
+#ifdef HAVE_NTGUI
+ if (w32_use_visible_system_caret)
+ return false;
+#endif
+
/* The variable new_start now holds the new window start. The old
start `start' can be determined from the current matrix. */
SET_TEXT_POS_FROM_MARKER (new_start, w->start);
if (MATRIX_ROW_START_CHARPOS (row) == MATRIX_ROW_END_CHARPOS (row))
GIVE_UP (20);
+ /* Can't let scroll_run_hook below run on w32 GUI frames when
+ position of point is indicated by the system caret, because
+ scrolling the display will then "copy" the pixles used by the
+ caret. */
+#ifdef HAVE_NTGUI
+ if (FRAME_W32_P (f) && w32_use_visible_system_caret)
+ GIVE_UP (25);
+#endif
+
/* Compute the position at which we have to start displaying new
lines. Some of the lines at the top of the window might be
reusable because they are not displaying changed text. Find the