[scintilla:bugs] #2333 [Scintilla] Mouse cursor visibility when typing starts

3 views
Skip to first unread message

Alan Kilborn

unread,
May 20, 2022, 3:18:46 PM5/20/22
to scintill...@googlegroups.com

[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.

pryrt

unread,
May 20, 2022, 3:39:46 PM5/20/22
to scintill...@googlegroups.com

The same happens in SciTE 5.2.2, so it's not just Notepad++'s usage of the library.

Neil Hodgson

unread,
May 20, 2022, 5:30:17 PM5/20/22
to scintill...@googlegroups.com
  • labels: --> scintilla, win32
  • status: open --> open-accepted
  • Group: Bug --> Feature_Request

[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

johnsonj

unread,
May 30, 2023, 11:48:03 PM5/30/23
to scintill...@googlegroups.com

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

johnsonj

unread,
May 30, 2023, 11:49:28 PM5/30/23
to scintill...@googlegroups.com

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

Neil Hodgson

unread,
Jun 2, 2023, 6:03:15 PM6/2/23
to scintill...@googlegroups.com

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

Zufu Liu

unread,
Jun 4, 2023, 9:00:01 AM6/4/23
to scintill...@googlegroups.com

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

johnsonj

unread,
Jun 5, 2023, 8:39:21 PM6/5/23
to scintill...@googlegroups.com

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

Neil Hodgson

unread,
Jun 5, 2023, 9:54:25 PM6/5/23
to scintill...@googlegroups.com

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

Neil Hodgson

unread,
Jun 8, 2023, 8:21:53 AM6/8/23
to scintill...@googlegroups.com
  • labels: scintilla, win32 --> scintilla, win32, mouse
  • status: open-accepted --> open-fixed
  • Comment:

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

johnsonj

unread,
Jun 10, 2023, 7:01:51 AM6/10/23
to scintill...@googlegroups.com

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

Neil Hodgson

unread,
Jun 11, 2023, 2:27:05 AM6/11/23
to scintill...@googlegroups.com

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::SetCursorcalling 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

Zufu Liu

unread,
Jun 11, 2023, 7:33:59 PM6/11/23
to scintill...@googlegroups.com

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

Neil Hodgson

unread,
Jul 26, 2023, 7:24:54 PM7/26/23
to scintill...@googlegroups.com
  • status: open-fixed --> closed-fixed

[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

johnsonj

unread,
May 21, 2025, 8:53:37 AMMay 21
to scintill...@googlegroups.com

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

Neil Hodgson

unread,
May 21, 2025, 6:53:53 PMMay 21
to scintill...@googlegroups.com

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

johnsonj

unread,
May 21, 2025, 11:39:11 PMMay 21
to scintill...@googlegroups.com

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

Neil Hodgson

unread,
May 22, 2025, 6:17:02 PMMay 22
to scintill...@googlegroups.com

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

johnsonj

unread,
May 23, 2025, 1:48:34 AMMay 23
to scintill...@googlegroups.com

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

Neil Hodgson

unread,
May 23, 2025, 6:50:25 PMMay 23
to scintill...@googlegroups.com

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

Reply all
Reply to author
Forward
0 new messages