mirror of
https://github.com/danbulant/cushy
synced 2026-06-18 14:01:10 +00:00
Closing no longer repeats
Closes #108 Turns out there was a property on KeyEvent this whole time... oops.
This commit is contained in:
parent
cda13c42a2
commit
e548f1255d
2 changed files with 6 additions and 1 deletions
|
|
@ -71,6 +71,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
`IntoDynamic<Progress>`. In general, this should not cause any code breakages
|
||||
unless the traits were being used in generics.
|
||||
- `Space` now honors `ConstraintLimit::Fill` in its layout.
|
||||
- When handling the Ctrl/Cmd+W shortcut to close windows, repeat keys are now
|
||||
ignored.
|
||||
|
||||
### Changed
|
||||
|
||||
|
|
|
|||
|
|
@ -999,7 +999,10 @@ where
|
|||
{
|
||||
match input.logical_key {
|
||||
Key::Character(ch) if ch == "w" && window.modifiers().primary() => {
|
||||
if input.state.is_pressed() && self.behavior.close_requested(window) {
|
||||
if !input.repeat
|
||||
&& input.state.is_pressed()
|
||||
&& self.behavior.close_requested(window)
|
||||
{
|
||||
self.should_close = true;
|
||||
window.set_needs_redraw();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue