summaryrefslogtreecommitdiffstats
path: root/webkit
diff options
context:
space:
mode:
authorstuartmorgan@chromium.org <stuartmorgan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-08 23:49:37 +0000
committerstuartmorgan@chromium.org <stuartmorgan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-08 23:49:37 +0000
commitce154da766f16bc59390de94726587645c5fed2b (patch)
tree41bfaea4689fbbbb6801bf85ce52ff2430456f8f /webkit
parent446b42d218dfb6ba77b88c3d6ebde73a51fbf423 (diff)
downloadchromium_src-ce154da766f16bc59390de94726587645c5fed2b.zip
chromium_src-ce154da766f16bc59390de94726587645c5fed2b.tar.gz
chromium_src-ce154da766f16bc59390de94726587645c5fed2b.tar.bz2
Improve handling of plugin context menus on Leopard.
Don't switch to the plugin process when bringing up the dummy window that holds context menus on 10.5. This improves key handling in the menu, as well as preventing the browser window from dimming. BUG=40058 TEST=Right-click on a Flash instance on 10.5 using Flash 10.1. The window should appear to stay focused, and the menu should respond to keys (up, down, esc). Review URL: http://codereview.chromium.org/1631004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44020 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r--webkit/glue/plugins/plugin_instance_mac.mm5
1 files changed, 3 insertions, 2 deletions
diff --git a/webkit/glue/plugins/plugin_instance_mac.mm b/webkit/glue/plugins/plugin_instance_mac.mm
index 35e257d..9800198 100644
--- a/webkit/glue/plugins/plugin_instance_mac.mm
+++ b/webkit/glue/plugins/plugin_instance_mac.mm
@@ -102,9 +102,10 @@ NPError PluginInstance::PopUpContextMenu(NPMenu* menu) {
window = [[NSWindow alloc] initWithContentRect:dummy_window_rect
styleMask:NSBorderlessWindowMask
backing:NSBackingStoreNonretained
- defer:NO];
+ defer:YES];
+ [window setTitle:@"PopupMenuDummy"]; // Lets interposing identify it.
[window setAlphaValue:0];
- [window orderFront:nil];
+ [window makeKeyAndOrderFront:nil];
[NSMenu popUpContextMenu:nsmenu
withEvent:NSEventForNPCocoaEvent(currently_handled_event_,
window)