mirror of
https://github.com/aseprite/aseprite.git
synced 2025-01-29 03:32:48 +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;
|
return true;
|
||||||
|
|
||||||
case kKeyDownMessage:
|
case kKeyDownMessage:
|
||||||
if (static_cast<KeyMessage*>(msg)->scancode() == kKeyEsc) {
|
if (getRoot()->isForeground() &&
|
||||||
|
static_cast<KeyMessage*>(msg)->scancode() == kKeyEsc) {
|
||||||
setSelected(true);
|
setSelected(true);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case kKeyUpMessage:
|
case kKeyUpMessage:
|
||||||
if (static_cast<KeyMessage*>(msg)->scancode() == kKeyEsc) {
|
if (getRoot()->isForeground() &&
|
||||||
|
static_cast<KeyMessage*>(msg)->scancode() == kKeyEsc) {
|
||||||
if (isSelected()) {
|
if (isSelected()) {
|
||||||
setSelected(false);
|
setSelected(false);
|
||||||
closeWindow();
|
closeWindow();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user