Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

notify brackets before popping up native menu

  • Loading branch information...
commit 2a11b24b8b8bec725071649a565581833ed24cf1 1 parent 11628ee
Randy Edmunds redmunds authored
Showing with 8 additions and 4 deletions.
  1. +3 −0  appshell/cefclient_win.cpp
  2. +5 −4 appshell/command_callbacks.h
3  appshell/cefclient_win.cpp
View
@@ -866,6 +866,9 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam,
return 0;
case WM_INITMENUPOPUP:
+ // Notify before popping up
+ g_handler->SendJSCommand(g_handler->GetBrowser(), APP_BEFORE_MENUPOPUP);
+
HMENU menu = (HMENU)wParam;
int count = GetMenuItemCount(menu);
void* menuParent = getMenuParent(g_handler->GetBrowser());
9 appshell/command_callbacks.h
View
@@ -5,10 +5,11 @@
// Command names. These MUST be in sync with the command names in
// brackets/src/command/Commands.js
-const std::string APP_ABORT_QUIT = "app.abort_quit";
-const std::string FILE_QUIT = "file.quit";
-const std::string FILE_CLOSE_WINDOW = "file.close_window";
-const std::string HELP_ABOUT = "help.about";
+const std::string APP_ABORT_QUIT = "app.abort_quit";
+const std::string APP_BEFORE_MENUPOPUP = "app.before.menupopup";
+const std::string FILE_QUIT = "file.quit";
+const std::string FILE_CLOSE_WINDOW = "file.close_window";
+const std::string HELP_ABOUT = "help.about";
#if defined(OS_WIN)
const ExtensionString EDIT_UNDO = L"edit.undo";
Please sign in to comment.
Something went wrong with that request. Please try again.