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:21:17 +01:00
parent 8e8f7748d3
commit 2580b20edd
+4 -1
View File
@@ -706,11 +706,15 @@ BrowserWindow::DispatchMessage(BMessage* message, BHandler* target)
return; return;
} }
} else if (bytes[0] == B_ESCAPE) { } else if (bytes[0] == B_ESCAPE) {
if (modifierKeys == B_COMMAND_KEY)
_ShowInterface(true);
else {
// Default escape key behavior: // Default escape key behavior:
PostMessage(STOP); PostMessage(STOP);
return; return;
} }
} }
}
if (message->what == B_MOUSE_MOVED || message->what == B_MOUSE_DOWN if (message->what == B_MOUSE_MOVED || message->what == B_MOUSE_DOWN
|| message->what == B_MOUSE_UP) { || message->what == B_MOUSE_UP) {
@@ -1113,7 +1117,6 @@ BrowserWindow::MenusBeginning()
{ {
_UpdateHistoryMenu(); _UpdateHistoryMenu();
_UpdateClipboardItems(); _UpdateClipboardItems();
_ShowInterface(true);
} }