Change keyboard focus to Exclusive when dialog is open#2575
Open
blackteaextract wants to merge 1 commit intonoctalia-dev:mainfrom
Open
Change keyboard focus to Exclusive when dialog is open#2575blackteaextract wants to merge 1 commit intonoctalia-dev:mainfrom
blackteaextract wants to merge 1 commit intonoctalia-dev:mainfrom
Conversation
This fixes an issue with onscreen-keyboards, see: noctalia-dev/noctalia-plugins#758
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request
Motivation
When a settings dialog opens from the bar,
PopupMenuWindowusesWlrKeyboardFocus.OnDemand. The problem withOnDemandis that the compositor doesn't transfer keyboard focus until the user explicitly taps the surface — so whatever was focused before (e.g. a browser) stays focused.This breaks on-screen keyboards: Squeekboard auto-hides because it sees no active text input in the focused window, or - as also wvkbd - keeps routing input to the background app. Reproduces with any plugin/widget settings opened from the bar on a touchscreen; doesn't affect the general settings panel.
Switching to
Exclusivemakes the dialog claim focus immediately on open, which fixes both.Only affects when
hasDialogistrue, so menus and tray are untouched.Note: a
qt.qpa.wayland.textinputwarning (Got leave event for surface 0x0) may still appear in logs during the focus transition. This is a pre-existing Qt Wayland quirk unrelated to this change and has no functional impact.Known Follow-up Issues
This fix makes the OSK usable inside the dialog but exposes two remaining touchscreen UX gaps that are out of scope for this PR:
MouseAreainPopupMenuWindowcatches the tap before the bar widget does, triggeringclose(). This means you can't toggle the OSK off while the settings dialog is open.Both require further changes to
PopupMenuWindow/ the dialog layout.Just asking: If there is an interest in investigating more quirks with touchscreen input in a broader or general sense, would opening an issue to collect more about touchscreen behavior be an option?
Type of Change
Related Issue
Testing
Checklist