-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Have non-resizable Areas ignore mouse input just beyond their bounds (#…
…3039) As described in #576, the method `Memory::layer_id_at` expands the hit-testing region for every `Area` slightly. This is necessary so that, when the user clicks to resize a `Window`, the mouse input isn't routed to a different `Window`. For non-resizable `Area`s (such as dropdown menus, context menus, date pickers, and any non-resizable `Window`), this causes them to be surrounded by a "dead zone" where any underlying widgets can't be hovered or clicked. The effect is particularly noticeable in menu bars. This commit adds a persisted `edges_padded_for_resize` property to `Area`, which is `true` when the `Area` belongs to a resizable `Window` and `false` for all other `Area`s. The hit-testing region is only expanded when this property is `true`. --------- Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
- Loading branch information
1 parent
1777bb7
commit 5432f91
Showing
4 changed files
with
32 additions
and
3 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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