summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGlenn Morris <rgm@gnu.org>2020-01-22 07:55:18 -0800
committerGlenn Morris <rgm@gnu.org>2020-01-22 07:55:18 -0800
commit5715eb94e90b33ace59dd4c4ccb6e2122bc6db72 (patch)
tree1c3aef6f5135b25738cd0d3a98ad807ec698ac1e /src
parenta1bfb926ca484190298045fc9e775002fe872bb5 (diff)
parent3b0938c0420de2b845e7e8f8fbbb57ddc61718f2 (diff)
downloademacs-5715eb94e90b33ace59dd4c4ccb6e2122bc6db72.tar.gz
Merge from origin/emacs-27
3b0938c042 (origin/emacs-27) Render Ido suggestions using an overlay d5d90dc412 * doc/misc/tramp.texi (Bug Reports): Encourage use of "ema... ac09e8e121 * lisp/vc/smerge-mode.el (smerge-match-conflict): Fix bug#... 7e37e61f4b Correct statement about ftcr and recommend HarfBuzz 4aec94da37 Avoid leaving artifacts when the system caret is used on w32 5abd8d73b0 Improve display of temporary echo messages
Diffstat (limited to 'src')
-rw-r--r--src/dispnew.c13
-rw-r--r--src/w32term.c6
-rw-r--r--src/xdisp.c17
3 files changed, 31 insertions, 5 deletions
diff --git a/src/dispnew.c b/src/dispnew.c
index 9af1ce259d4..d094ca61798 100644
--- a/src/dispnew.c
+++ b/src/dispnew.c
@@ -3743,11 +3743,10 @@ gui_update_window_end (struct window *w, bool cursor_on_p,
{
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,
@@ -3761,6 +3760,7 @@ gui_update_window_end (struct window *w, bool cursor_on_p,
else
gui_draw_vertical_border (w);
}
+ unblock_input ();
}
/* If a row with mouse-face was overwritten, arrange for
@@ -3778,7 +3778,6 @@ gui_update_window_end (struct window *w, bool cursor_on_p,
FRAME_RIF (f)->update_window_end_hook (w,
cursor_on_p,
mouse_face_overwritten_p);
- unblock_input ();
}
#endif /* HAVE_WINDOW_SYSTEM */
@@ -4360,6 +4359,14 @@ scrolling_window (struct window *w, int tab_line_p)
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;
diff --git a/src/w32term.c b/src/w32term.c
index c38e7409d90..4eb5045fc5b 100644
--- a/src/w32term.c
+++ b/src/w32term.c
@@ -560,7 +560,8 @@ static void
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);
@@ -657,7 +658,8 @@ w32_update_window_end (struct window *w, bool cursor_on_p,
/* 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);
diff --git a/src/xdisp.c b/src/xdisp.c
index 516013ce4ba..a5efbb39bed 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -19191,6 +19191,14 @@ try_window_reusing_current_matrix (struct window *w)
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);
@@ -20175,6 +20183,15 @@ try_window_id (struct window *w)
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