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

[libuwac] fix keyboard "sticky" keys when entering window #9725

Merged
merged 3 commits into from
Jan 11, 2024

Conversation

manio
Copy link
Contributor

@manio manio commented Jan 3, 2024

The commit is fixing the following problem:
When the freerdp window gets keyboard focus and is notified, it wrongly process keys which are held, not a freshly pressed.

The comment in the code explains it more.

@freerdp-bot
Copy link

Can one of the admins verify this patch?

@manio
Copy link
Contributor Author

manio commented Jan 4, 2024

The change seems to be working fine... but I have sometimes the situation, that when I enter a freerdp window and start typing I have some modifier key active and I have to press all modifier keys to have it return to normal state...
I am setting this to draft and will test it for some longer period...

@manio manio marked this pull request as draft January 4, 2024 12:37
The commit is fixing the following problem:
When the freerdp window gets keyboard focus and is notified,
it wrongly process keys which are *held*, not a freshly pressed.

The comment in the code explains it more.
The commit is fixing the problem when eg. a user is pressing some
modifier key to switch from active FreeRDP window and when get back to
that window, it "virtually" has that modifier key pressed, thus leading
to pressing eg. `Win+r` instead of just `r`.
@manio
Copy link
Contributor Author

manio commented Jan 10, 2024

Hi again,
I tested it for some time and think it's ready for merge.
Switching from Draft to ready...

Edit: also added one fix for the scaling code as it is also for uwac

@manio manio marked this pull request as ready for review January 10, 2024 12:33
Fix for a hybrid multimonitor configurations:
Previous code was working for me because the display with scale=2
was last on the wayland display list. After restarting it was earlier.
To fix this - just take the highest scale provided by a display.
Similar as eg. here the SDL is doing:
https://github.com/libsdl-org/SDL/blob/b5bc64aa553fe12d09fe2821eace14ea5b948bd9/src/video/wayland/SDL_waylandwindow.c#L1170
@akallabeth
Copy link
Member

@freerdp-bot test

@akallabeth akallabeth added this to the next-3.2 milestone Jan 11, 2024
@freerdp-bot
Copy link

Refer to this link for build results (access rights to CI server needed):
https://ci.freerdp.com//job/PullRequestTester/11177/

@akallabeth akallabeth merged commit 4c17dfb into FreeRDP:master Jan 11, 2024
3 checks passed
@manio
Copy link
Contributor Author

manio commented Jan 11, 2024

Thank you

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.

None yet

3 participants