Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added mouse cursor auto-hiding to QTermWidget #582

Merged
merged 1 commit into from
Feb 7, 2025
Merged

Conversation

tsujan
Copy link
Member

@tsujan tsujan commented Feb 6, 2025

Mouse cursor auto-hiding was implemented by @luebking: b150d85

Apart from adding mouse auto-hiding to QTermWidget, this patch fixes two issues of the above implementation:

  1. focusInEvent and focusOutEvent weren't good for controlling auto-hiding, because the hidden mouse cursor can be near other widgets of the app (tab, menu-bar, …), in which case, it wasn't shown when put on them. Therefore, enterEvent, and leaveEvent are used instead.
  2. The scrollbar needed a separate handling because it's a child of TerminalDisplay.

NOTE: A related PR for QTerminal will follow this one.

Mouse cursor auto-hiding was implemented by @luebking: b150d85

Apart from adding mouse auto-hiding to `QTermWidget`, this patch fixes two issues of the above implementation:

 1. `focusInEvent` and `focusOutEvent` weren't good for controlling auto-hiding, because the hidden mouse cursor can be near other widgets of the app (tab, menu-bar, …), in which case, it wasn't shown when put on them. Therefore, `enterEvent`, and `leaveEvent` are used instead.
 2. The scrollbar needed a separate handling because it's a child of `TerminalDisplay`.

NOTE: A related PR for QTerminal will follow this one.
tsujan added a commit to lxqt/qterminal that referenced this pull request Feb 6, 2025
This patch needs lxqt/qtermwidget#582.

The new option is in Preferences → Behavior. It can be from "Never" to 60 seconds. A value of zero hides the cursor immediately (as designed by @luebking).

Closes #403
tsujan added a commit to lxqt/qterminal that referenced this pull request Feb 7, 2025
This patch needs lxqt/qtermwidget#582.

The new option is in Preferences → Behavior. It can be from "No hiding" to 60 seconds. A value of zero hides the cursor immediately (as designed by @luebking).

Closes #403
@tsujan tsujan merged commit 6d1f8bb into master Feb 7, 2025
@tsujan tsujan deleted the mouse_sutohide branch February 7, 2025 21:54
tsujan added a commit to lxqt/qterminal that referenced this pull request Feb 7, 2025
This patch needs lxqt/qtermwidget#582.

The new option is in Preferences → Behavior. It can be from "No hiding" to 60 seconds. A value of zero hides the cursor immediately (as designed by @luebking).

Closes #403
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant