Skip to content

fix: stuck keys on leave#7520

Merged
sithlord48 merged 1 commit intodeskflow:masterfrom
enzious:fix/stuck-keys-on-leave
Sep 18, 2024
Merged

fix: stuck keys on leave#7520
sithlord48 merged 1 commit intodeskflow:masterfrom
enzious:fix/stuck-keys-on-leave

Conversation

@enzious
Copy link
Copy Markdown
Contributor

@enzious enzious commented Sep 18, 2024

Blocked by: #7522


On exiting a screen, deskflow attempts to unset keys that are down while leaving the screen. In some cases, such as with Wayland (EiScreen), the keys are reset but after the device emulation has already ended by Screen::leave(). This leaves the keys in the pressed state since the reset will fail after emulation stops, and may leave the keys stuck pressed until the environment implementing libei is restarted (such as with Kwin).

This pull request splits Screen::leave() into Screen::canLeave() and Screen::leave(), allowing for the keys to be reset in between.

Basically:
Check for screen leave allowed -> Reset keys -> Actually leave

Resolves: #7518

@enzious enzious force-pushed the fix/stuck-keys-on-leave branch from 1c3edf0 to 81080f8 Compare September 18, 2024 01:51
@enzious
Copy link
Copy Markdown
Contributor Author

enzious commented Sep 18, 2024

Side note - after rebasing on master, I'm getting the following error while attempting to build for Windows:

image

Copy link
Copy Markdown
Member

@sithlord48 sithlord48 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The initial commit can be dropped as its just changed completely by the second one.
Otherwise looks pretty good. Testing on inputleap

@enzious enzious force-pushed the fix/stuck-keys-on-leave branch 2 times, most recently from 4538a84 to 9893d80 Compare September 18, 2024 03:10
@sonarqubecloud
Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
9.8% Duplication on New Code (required ≤ 3%)

See analysis details on SonarCloud

@nbolton
Copy link
Copy Markdown
Member

nbolton commented Sep 18, 2024

Thanks for the PR, we're currently renaming the project and I'm in the process of restoring CI functionality.
Updates: #7517
Once CI is working, we can get your PR merged in.

@sithlord48 sithlord48 force-pushed the fix/stuck-keys-on-leave branch from 9893d80 to 44daa10 Compare September 18, 2024 14:59
@enzious enzious force-pushed the fix/stuck-keys-on-leave branch from 44daa10 to 2bf5ede Compare September 18, 2024 15:16
@sithlord48 sithlord48 force-pushed the fix/stuck-keys-on-leave branch from f63a63d to c0c20c8 Compare September 18, 2024 18:31
@sithlord48 sithlord48 force-pushed the fix/stuck-keys-on-leave branch from c0c20c8 to 4a044a9 Compare September 18, 2024 20:09
@sithlord48 sithlord48 merged commit 835dc4e into deskflow:master Sep 18, 2024
@enzious enzious deleted the fix/stuck-keys-on-leave branch October 18, 2025 10:11
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.

Holding a key and exiting screen of Linux Wayland KDE client gets key stuck

3 participants