WebPositive: fix cmd+esc handling

* Don't show the menu in MenusBeginning, this is invoked for all
shortcuts, so cmd+C and others would show the menu. Fixes #9186.
* Instead, show the interface specifically for the CMD+ESC case. Also,
send that key event to the default window handler so the menu opens.
Before, this was mistakenly sent to the "stop" button. Fixes #10523.
This commit is contained in:
Adrien Destugues 2014-03-05 17:17:36 +01:00
parent 8e8f7748d3
commit 2580b20edd

View File

@ -706,9 +706,13 @@ BrowserWindow::DispatchMessage(BMessage* message, BHandler* target)
return;
}
} else if (bytes[0] == B_ESCAPE) {
// Default escape key behavior:
PostMessage(STOP);
return;
if (modifierKeys == B_COMMAND_KEY)
_ShowInterface(true);
else {
// Default escape key behavior:
PostMessage(STOP);
return;
}
}
}
@ -1113,7 +1117,6 @@ BrowserWindow::MenusBeginning()
{
_UpdateHistoryMenu();
_UpdateClipboardItems();
_ShowInterface(true);
}