notepad-plus-plus/scintilla/win32
Udo Hoffmann d55350b4b5
Fix mouse cursor flicker while hovering
The reason, why the flicker occurs, is the following: There are two Windows messages sent by Windows to Scintilla, when the mouse is moved: WM_MOUSEMOVE and WM_SETCURSOR.

WM_MOUSEMOVE informs Scintilla, that the mouse has been moved inside its window.
WM_SETCURSOR informs Scintilla, that the mouse cursor has been moved. Anywhere, not necessarily in its window.
Scintilla calls the Windows function SetCursor (, which sets the mouse cursor shape, not the position), while processing both messages. Unfortunately, Scintilla uses different ways to calculate the desired cursor shape. So, whenever the mouse cursor is moved, two SetCursor calls are applied, sometimes with two different cursor shapes.

On WM_MOUSEMOVE, Scintilla calls ButtonMoveWithModifiers, which sets the correct cursor shape.
On WM_SETCURSOR, Scintilla calls SetCursor directly, sometimes with the wrong cursor shape.

This PR shows how to eliminate this effect in the modified Scintilla version used by Notepad++. This may be the fastest way to get results without introducing new effects.

The current original Scintilla version (Version 4.4.4, downloaded 2020-07-30, 5d134721c303ceecbdcb28ec82b28f0cbbdb4a55) has the same effect and can be fixed in the same way, although the WM_SETCURSOR code has been changed a little. Before updating to a new Scintilla version, we should try to get it fixed in the original Scintilla.

Fix #8588, fix #8647, close #8641
2020-08-01 15:41:04 +02:00
..
DepGen.py Upgrade Scintilla from 4.1.4 to 4.2.0 2019-07-22 13:08:41 +02:00
HanjaDic.cxx Upgrade Scintilla from 4.1.4 to 4.2.0 2019-07-22 13:08:41 +02:00
HanjaDic.h Upgrade Scintilla from v3.56 to v4.14 2019-05-04 21:14:48 +03:00
PlatWin.cxx Upgrade Scintilla from 4.1.4 to 4.2.0 2019-07-22 13:08:41 +02:00
PlatWin.h Upgrade Scintilla from v3.56 to v4.14 2019-05-04 21:14:48 +03:00
SciLexer.vcxproj Upgrade Scintilla from 4.1.4 to 4.2.0 2019-07-22 13:08:41 +02:00
SciTE.properties
ScintRes.rc Upgrade Scintilla from 4.1.4 to 4.2.0 2019-07-22 13:08:41 +02:00
Scintilla.def
ScintillaDLL.cxx Upgrade Scintilla from v3.56 to v4.14 2019-05-04 21:14:48 +03:00
ScintillaWin.cxx Fix mouse cursor flicker while hovering 2020-08-01 15:41:04 +02:00
ScintillaWin.h Upgrade Scintilla from v3.56 to v4.14 2019-05-04 21:14:48 +03:00
deps.mak Upgrade Scintilla from 4.1.4 to 4.2.0 2019-07-22 13:08:41 +02:00
makefile Upgrade Scintilla from 4.1.4 to 4.2.0 2019-07-22 13:08:41 +02:00
nmdeps.mak Upgrade Scintilla from 4.1.4 to 4.2.0 2019-07-22 13:08:41 +02:00
scintilla.mak Upgrade Scintilla from 4.1.4 to 4.2.0 2019-07-22 13:08:41 +02:00