[bugs:#2333] [Scintilla] Mouse cursor visibility when typing starts
Status: open
Group: Bug
Created: Fri May 20, 2022 07:18 PM UTC by Alan Kilborn
Last Updated: Fri May 20, 2022 07:18 PM UTC
Owner: nobody
In Notepad++ usage of Scintilla, my Windows 10 mouse options choice for "Hide pointer while typing" isn't respected when the mouse cursor and keyboard input focus is in a Scintilla control/window. Some further discussion is located here: https://community.notepad-plus-plus.org/topic/23017/mouse-cursor-visibility-when-typing-starts
Sent from sourceforge.net because scintill...@googlegroups.com is subscribed to https://sourceforge.net/p/scintilla/bugs/
To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/scintilla/admin/bugs/options. Or, if this is a mailing list, you can unsubscribe from the mailing list.
The same happens in SciTE 5.2.2, so it's not just Notepad++'s usage of the library.
[bugs:#2333] [Scintilla] Mouse cursor visibility when typing starts
Status: open-accepted
Group: Feature_Request
Labels: scintilla win32
Created: Fri May 20, 2022 07:18 PM UTC by Alan Kilborn
Last Updated: Fri May 20, 2022 07:39 PM UTC
Owner: nobody
Inspired from sakura editor.
patch added:
Attachments:
[bugs:#2333] [Scintilla] Mouse cursor visibility when typing starts
Status: open-accepted
Group: Feature_Request
Labels: scintilla win32
Created: Fri May 20, 2022 07:18 PM UTC by Alan Kilborn
Last Updated: Fri May 20, 2022 09:30 PM UTC
Owner: nobody
Respect SPI_GETMOUSEVANISH from OS
[bugs:#2333] [Scintilla] Mouse cursor visibility when typing starts
Status: open-accepted
Group: Feature_Request
Labels: scintilla win32
Created: Fri May 20, 2022 07:18 PM UTC by Alan Kilborn
Last Updated: Wed May 31, 2023 03:48 AM UTC
Owner: nobody
SPI_GETMOUSEVANISH sets a BOOL
(4 bytes), not a bool
(1 byte).
sizeof(bool)
0x0000000000000001
sizeof(BOOL)
0x0000000000000004
RequestShowCursor
doesn't need to call DisplayCursor
as the cursor will be set in soon-to-be-called ButtonMoveWithModifiers
and there could be flicker if set twice. Therefore RequestShowCursor
can just be isCursorHidden = false;
.
[bugs:#2333] [Scintilla] Mouse cursor visibility when typing starts
Status: open-accepted
Group: Feature_Request
Labels: scintilla win32
Created: Fri May 20, 2022 07:18 PM UTC by Alan Kilborn
Last Updated: Wed May 31, 2023 03:49 AM UTC
Owner: nobody
how about move SystemParametersInfoW(SPI_GETMOUSEVANISH, ...
into GetIntelliMouseParameters()
?
[bugs:#2333] [Scintilla] Mouse cursor visibility when typing starts
Status: open-accepted
Group: Feature_Request
Labels: scintilla win32
Created: Fri May 20, 2022 07:18 PM UTC by Alan Kilborn
Last Updated: Fri Jun 02, 2023 10:03 PM UTC
Owner: nobody
A function Shoud have only one function according its name.
[bugs:#2333] [Scintilla] Mouse cursor visibility when typing starts
Status: open-accepted
Group: Feature_Request
Labels: scintilla win32
Created: Fri May 20, 2022 07:18 PM UTC by Alan Kilborn
Last Updated: Sun Jun 04, 2023 12:59 PM UTC
Owner: nobody
GetMouseParameters
or GetSystemParameters
.
[bugs:#2333] [Scintilla] Mouse cursor visibility when typing starts
Status: open-accepted
Group: Feature_Request
Labels: scintilla win32
Created: Fri May 20, 2022 07:18 PM UTC by Alan Kilborn
Last Updated: Tue Jun 06, 2023 12:39 AM UTC
Owner: nobody
Committed as [5bd06e] with some name changes:
TypingWithoutCursor -> HideCursorIfPreferred
typingWithoutCursorByOS -> typingWithoutCursor
isCursorHidden -> cursorIsHidden
[bugs:#2333] [Scintilla] Mouse cursor visibility when typing starts
Status: open-fixed
Group: Feature_Request
Labels: scintilla win32 mouse
Created: Fri May 20, 2022 07:18 PM UTC by Alan Kilborn
Last Updated: Tue Jun 06, 2023 01:54 AM UTC
Owner: nobody
I appreciate you for your hard works.
I submit a patch for Qt.
Attachments:
[bugs:#2333] [Scintilla] Mouse cursor visibility when typing starts
Status: open-fixed
Group: Feature_Request
Labels: scintilla win32 mouse
Created: Fri May 20, 2022 07:18 PM UTC by Alan Kilborn
Last Updated: Thu Jun 08, 2023 12:21 PM UTC
Owner: nobody
Setting a global override cursor seems too likely to interfere with other elements of the application. It may be safer to set the cursor for the window as is done by Window::SetCursor
calling QWidget::setCursor
in qt/ScintillaEditBase/PlatQt.cpp
.
Despite having system settings support for "Hide pointer while typing", it is not commonly implemented on Windows. Even Microsoft products like Visual C++ and OneNote do not have it. Since it is unusual on Windows, it shouldn't be active unless the option has ben chosen but this Qt patch turns it on without checking the option.
[bugs:#2333] [Scintilla] Mouse cursor visibility when typing starts
Status: open-fixed
Group: Feature_Request
Labels: scintilla win32 mouse
Created: Fri May 20, 2022 07:18 PM UTC by Alan Kilborn
Last Updated: Sat Jun 10, 2023 11:01 AM UTC
Owner: nobody
It seems this needs further works: in Windows Notepad deleting character (e.g. with Backspace) mouse is still hidden.
[bugs:#2333] [Scintilla] Mouse cursor visibility when typing starts
Status: open-fixed
Group: Feature_Request
Labels: scintilla win32 mouse
Created: Fri May 20, 2022 07:18 PM UTC by Alan Kilborn
Last Updated: Sun Jun 11, 2023 06:27 AM UTC
Owner: nobody
[bugs:#2333] [Scintilla] Mouse cursor visibility when typing starts
Status: closed-fixed
Group: Feature_Request
Labels: scintilla win32 mouse
Created: Fri May 20, 2022 07:18 PM UTC by Alan Kilborn
Last Updated: Sun Jun 11, 2023 11:33 PM UTC
Owner: nobody
code simplified
[bugs:#2333] [Scintilla] Mouse cursor visibility when typing starts
Status: closed-fixed
Group: Feature_Request
Labels: scintilla win32 mouse
Created: Fri May 20, 2022 07:18 PM UTC by Alan Kilborn
Last Updated: Wed Jul 26, 2023 11:24 PM UTC
Owner: nobody
That doesn't work for me. The cursor flickers for the first character typed then switches to the arrow on the next.
[bugs:#2333] [Scintilla] Mouse cursor visibility when typing starts
Status: closed-fixed
Group: Feature_Request
Labels: scintilla win32 mouse
Created: Fri May 20, 2022 07:18 PM UTC by Alan Kilborn
Last Updated: Wed May 21, 2025 12:53 PM UTC
Owner: nobody
Thank you for your testing.
I am sorry I did not catch it.
patch attached:
Attachments:
[bugs:#2333] [Scintilla] Mouse cursor visibility when typing starts
Status: closed-fixed
Group: Feature_Request
Labels: scintilla win32 mouse
Created: Fri May 20, 2022 07:18 PM UTC by Alan Kilborn
Last Updated: Wed May 21, 2025 10:53 PM UTC
Owner: nobody
By placing the cursor hiding inside WM_KEYDOWN
the cursor is hidden for arrow movement and other keyboard commands. The "Hide pointer while typing" option is only meant for typing visible characters as demonstrated by Notepad and edit fields in system dialogs.
In the code NULL
is strongly disliked by code checking tools and comparing a HCURSOR
to nullptr
is also iffy so its best to rely on the falsy value of HCURSOR{} with a bare if (::GetCursor())
.
[bugs:#2333] [Scintilla] Mouse cursor visibility when typing starts
Status: closed-fixed
Group: Feature_Request
Labels: scintilla win32 mouse
Created: Fri May 20, 2022 07:18 PM UTC by Alan Kilborn
Last Updated: Thu May 22, 2025 03:39 AM UTC
Owner: nobody
Thank you for your instructions.
Gtk patch attached according your instructions.
Attachments:
[bugs:#2333] [Scintilla] Mouse cursor visibility when typing starts
Status: closed-fixed
Group: Feature_Request
Labels: scintilla win32 mouse
Created: Fri May 20, 2022 07:18 PM UTC by Alan Kilborn
Last Updated: Thu May 22, 2025 10:16 PM UTC
Owner: nobody
This doesn't appear to be checking the system for the equivalent to the "hide pointer while typing" choice SPI_GETMOUSEVANISH
.
[bugs:#2333] [Scintilla] Mouse cursor visibility when typing starts
Status: closed-fixed
Group: Feature_Request
Labels: scintilla win32 mouse
Created: Fri May 20, 2022 07:18 PM UTC by Alan Kilborn
Last Updated: Fri May 23, 2025 05:48 AM UTC
Owner: nobody