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