mirror of
https://github.com/aseprite/aseprite.git
synced 2025-01-16 04:13:50 +00:00
Avoid using ESC key to close non-foreground windows
This commit is contained in:
parent
300a5cc1cb
commit
1583cd82bd
@ -80,14 +80,16 @@ protected:
|
||||
return true;
|
||||
|
||||
case kKeyDownMessage:
|
||||
if (static_cast<KeyMessage*>(msg)->scancode() == kKeyEsc) {
|
||||
if (getRoot()->isForeground() &&
|
||||
static_cast<KeyMessage*>(msg)->scancode() == kKeyEsc) {
|
||||
setSelected(true);
|
||||
return true;
|
||||
}
|
||||
break;
|
||||
|
||||
case kKeyUpMessage:
|
||||
if (static_cast<KeyMessage*>(msg)->scancode() == kKeyEsc) {
|
||||
if (getRoot()->isForeground() &&
|
||||
static_cast<KeyMessage*>(msg)->scancode() == kKeyEsc) {
|
||||
if (isSelected()) {
|
||||
setSelected(false);
|
||||
closeWindow();
|
||||
|
Loading…
Reference in New Issue
Block a user