Repository navigation
2K3Z3XC Overlays: a mask of several regions, and keys on request - #371
Merged
Merged
Conversation
A plugin overlay can now hand over its own maskRegion, so a surface that draws several separate things keeps the gaps clickable, and can ask for keyboard focus while one of its text fields is in use.
An overlay can take the keyboard now, so it yields to a blocking modal like every other keyboard-taking window.
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.
Problem
A plugin overlay could hand core one item to mask input to. A surface that draws several separate things, like desktop widgets, had to mask their bounding box, which took the empty desktop's clicks and its right-click menu. An overlay also could never take the keyboard, so a widget holding a text field was impossible.
Plan
Two small, opt-in seams on
PluginOverlayWindow. Nothing changes for an overlay that uses neither.Resolution
maskRegion: an overlay item may expose aRegionof its own (with child regions) and core uses it as the window mask. Without one, the existingmaskItembehaviour is unchanged.wantsKeyboard: while it is true the overlay window takes keyboard focus on demand; otherwise focus staysNoneas before.The first user is the Desktop Widgets plugin (aphotic-plugins PR).
Surfaces.suppressed), the rule every keyboard-taking window follows, so it can never hold keys a modal needs.