diff options
author | Eli Zaretskii <eliz@gnu.org> | 2015-12-27 20:52:21 +0200 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2015-12-27 20:52:21 +0200 |
commit | 3ad99c4674e670b73e7dcd8de3fa00b6dec4448f (patch) | |
tree | f3a40bad541f0e97499fee390040089c209bebcc /src/w32fns.c | |
parent | f9d87dd8791d4e77929f21e4f73d92ef966722cc (diff) | |
download | emacs-3ad99c4674e670b73e7dcd8de3fa00b6dec4448f.tar.gz emacs-3ad99c4674e670b73e7dcd8de3fa00b6dec4448f.tar.bz2 emacs-3ad99c4674e670b73e7dcd8de3fa00b6dec4448f.zip |
Avoid leaving "ghost" of mouse pointer on MS-Windows
* src/w32term.c (frame_set_mouse_pixel_position):
* src/w32fns.c (Fw32_mouse_absolute_pixel_position): Momentarily
disable "mouse trails" when moving the mouse pointer. (Bug#22247)
* src/w32term.c (frame_set_mouse_pixel_position): Include
w32common.h.
Diffstat (limited to 'src/w32fns.c')
-rw-r--r-- | src/w32fns.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/w32fns.c b/src/w32fns.c index 4be322182ce..c1d9bff98ab 100644 --- a/src/w32fns.c +++ b/src/w32fns.c @@ -8093,11 +8093,22 @@ The coordinates X and Y are interpreted in pixels relative to a position (0, 0) of the selected frame's display. */) (Lisp_Object x, Lisp_Object y) { + UINT trail_num = 0; + BOOL ret = false; + CHECK_TYPE_RANGED_INTEGER (int, x); CHECK_TYPE_RANGED_INTEGER (int, y); block_input (); + /* When "mouse trails" are in effect, moving the mouse cursor + sometimes leaves behind an annoying "ghost" of the pointer. + Avoid that by momentarily switching off mouse trails. */ + if (os_subtype == OS_NT + && w32_major_version + w32_minor_version >= 6) + ret = SystemParametersInfo (SPI_GETMOUSETRAILS, 0, &trail_num, 0); SetCursorPos (XINT (x), XINT (y)); + if (ret) + SystemParametersInfo (SPI_SETMOUSETRAILS, trail_num, NULL, 0); unblock_input (); return Qnil; |