From 2580b20edda3555d7daa0c99999ced147ff2b81b Mon Sep 17 00:00:00 2001 From: Adrien Destugues Date: Wed, 5 Mar 2014 17:17:36 +0100 Subject: [PATCH] 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. --- src/apps/webpositive/BrowserWindow.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/apps/webpositive/BrowserWindow.cpp b/src/apps/webpositive/BrowserWindow.cpp index 7db8358c21..9bb97be3b8 100644 --- a/src/apps/webpositive/BrowserWindow.cpp +++ b/src/apps/webpositive/BrowserWindow.cpp @@ -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); }