mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Fix app-focus issues right-clicking on backgrounded browser window. b=416455 r=josh sr=roc a1.9b4=beltzner
This commit is contained in:
parent
5a3b426d4b
commit
909d531694
@ -50,6 +50,8 @@
|
||||
#include "nsToolkit.h"
|
||||
#include "nsCRT.h"
|
||||
#include "nsplugindefs.h"
|
||||
#include "nsIPrefService.h"
|
||||
#include "nsIPrefBranch.h"
|
||||
|
||||
#include "nsIFontMetrics.h"
|
||||
#include "nsIDeviceContext.h"
|
||||
@ -3340,6 +3342,18 @@ static nsEventStatus SendGeckoMouseEnterOrExitEvent(PRBool isTrusted,
|
||||
if (!mGeckoChild)
|
||||
return nil;
|
||||
|
||||
// If we're running in a browser that (unlike Camino) uses non-native
|
||||
// context menus, we must call maybeInitContextMenuTracking. This call was
|
||||
// dropped with the patch for bug 396186, which caused at least one
|
||||
// regression (bug 416455).
|
||||
nsCOMPtr<nsIPrefBranch> prefs = do_GetService(NS_PREFSERVICE_CONTRACTID);
|
||||
if (prefs) {
|
||||
PRBool useNativeContextMenus;
|
||||
nsresult rv = prefs->GetBoolPref("ui.use_native_popup_windows", &useNativeContextMenus);
|
||||
if (!NS_SUCCEEDED(rv) || !useNativeContextMenus)
|
||||
[self maybeInitContextMenuTracking];
|
||||
}
|
||||
|
||||
// Go up our view chain to fetch the correct menu to return.
|
||||
return [self contextMenu];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user