Right click on Landing Page button should not show any Plumber frame
tflo opened this issue · 4 comments
This is a continuation of a comment on CurseForge
Quoting the posts from CurseForge comments:
I have a small niggle. The trigger for the current expansions summary should only be left-click, but when I right-click on the map button to bring up the selection list for previous expansions this also triggers the current summary report to open.
Hi! Maybe one of your addons modified minimap buttons, on the default UI it shouldn't behave like this.
I have the same issue, and I think it wasn’t always like that.
I have an addon that provides a contextual menu when right-clicking the landing page button (probably Master Plan, or Venture Plan, not sure). That is, when I right click the button, I expect the context menu, but not the Plumber summary report frame popping on screen. I expect the Plumber frame when I left click the landing page button.
This is not a game-breaking problem. I can simply click the Plumber frame away, but it’s a bit ugly/clunky, and it (most likely) could be solved by only registering left-click for showing the Plumber frame.
[…]
The context menu is also from Plumber, and it was only triggered by Right Mouse Button Up. And we didn't modify the landing page button's clicking behavior; we override a WoW global function "ToggleExpansionLandingPage" to situationally open our UI. So it's likely due to another addon that mixed left click and right click together.
My actual reply:
The context menu is also from Plumber
I know that Plumber provides a similar context menu for the Landing Page button (with the “garrison” versions of the different xpacs, called “Minimap Mission Report” in the Plumber settings). I have disabled that Plumber setting, because I prefer the context menu already offered by the other addons (Master Plan / War Plan), so it’s not the one by Plumber I’m referring to.
Expected behavior:
- Left click on Landing Page button with “Minimap Mission Report” enabled: Plumber frame pops up
- Left click on Landing Page button without “Minimap Mission Report” enabled: Plumber frame pops up
- Right click on Landing Page button with “Minimap Mission Report” enabled: Plumber contextual menu, no Plumber frame
- Right click on Landing Page button without “Minimap Mission Report” enabled: no Plumber action at all
Current bahavior:
Right click on Landing Page button without “Minimap Mission Report” enabled: Plumber frame pops up
Now to the nitty-gritty:
You were right. Without any other addons, and with Plumber's “Minimap Mission Report” disabled, nothing happens on right-click (as it should be).
So, probably some function in War Plan or Master Plan is calling a frame that it shouldn't call (or in a broader sense: is calling whatever API function that triggers your frame to be shown; I didn't dig into that (yet)).
This was not a problem before I started using Plumber (a right click did not open any frame, it just opened the contextual menu).
So, strictly spoken, this is not your issue. But maybe you can do something for compatibility(?)
PS: I've sent a mention of this issue to foxlit too.
I've examined and tested MasterPlan, and this is why it happened:
- WoW's ExpansionLandingPageMinimapButton toggles landing pages OnClick, but it doesn't specify which mouse button should be processed because by default, this minimap button only registers the left mouse button.
- MasterPlan modifies WoW's minimap button, making it listen to both the left and right mouse buttons, so it can generate a context menu when right-clicked. This right click will also trigger WoW's landing page, but MasterPlan hides it right away. Their addon also mutes the frame open sound so that you wouldn't notice anything unusual.
To fix it, you'll need to modify this file in MasterPlan (0.143b):
- Open
AddOns\MasterPlan\PlanA\PlanA.lua - Create a new line below line#150, and paste
if PlumberExpansionLandingPage then PlumberExpansionLandingPage:Hide() end

To fix it, you'll need to modify this file in MasterPlan
I'll send a new notification with a link to your suggestion to the author of Master Plan / War Plan (foxlit). If he doesn't implement the conditional, well, I'll fix I in my local copies, which should not be a big hassle, since Master plan and War Plan are in maintenance state (aka only updated for new WoW versions).
Thanks for your investigation work!
For the record: Master Plan and War Plan have been updated/updated, with relevant changes:
Made it easier for third-party addons to interact with or disable Master Plan's minimap button right-click menu.
Noteworthy diffs
Master Plan
--- Old 2025-09-26 21:40:27.000000000
+++ New 2025-09-26 21:22:01.000000000
@@ -99,13 +102,19 @@
if displayMode == "MENU" then
menuFrame.displayMode = displayMode
end
UIDropDownMenu_Initialize(menuFrame, EasyMenu_Initialize, displayMode, nil, menuList)
ToggleDropDownMenu(1, nil, menuFrame, anchor, x, y, menuList, nil, autoHideDelay)
end
-do
+local function hookLandingMenu()
+ if GarrisonLandingPageMinimapButton.altMenuManager == nil then
+ GarrisonLandingPageMinimapButton:RegisterForClicks("LeftButtonUp", "RightButtonUp")
+ GarrisonLandingPageMinimapButton.altMenuManager = addonName
+ else
+ return
+ end
local followerTabNames = {[2]=GARRISON_FOLLOWERS, [3]=FOLLOWERLIST_LABEL_CHAMPIONS, [9]=FOLLOWERLIST_LABEL_CHAMPIONS, [111]=COVENANT_MISSIONS_FOLLOWERS}
local function ShowLanding(_, page)
HideUIPanel(GarrisonLandingPage)
ShowGarrisonLandingPage(page)
local fn = followerTabNames[page or C.GetLandingPageGarrisonType()]
if fn then
@@ -116,39 +125,55 @@
HideUIPanel(ExpansionLandingPage)
end
end
local function IsLandingPageVisible()
return GarrisonLandingPage and GarrisonLandingPage:IsVisible()
end
+ local function GetExpansionLandingPage()
+ return ExpansionLandingPage and ExpansionLandingPage.replacementLandingPage or PlumberExpansionLandingPage or ExpansionLandingPage or nil
+ end
local function IsExpansionPageVisible()
+ local ExpansionLandingPage = GetExpansionLandingPage()
return ExpansionLandingPage and ExpansionLandingPage:IsVisible()
end
local landingChoiceMenu, landingChoices
- GarrisonLandingPageMinimapButton:RegisterForClicks("LeftButtonUp", "RightButtonUp")
GarrisonLandingPageMinimapButton:HookScript("PreClick", function(self, b)
+ if self.altMenuManager ~= addonName then
+ return
+ end
self.landingVisiblePriorToClick = IsLandingPageVisible() and GarrisonLandingPage and GarrisonLandingPage.garrTypeID
self.expansionPageVisiblePriorToClick = IsExpansionPageVisible()
if b == "RightButton" then
local soundOK, soundID = PlaySound(SOUNDKIT.UI_GARRISON_GARRISON_REPORT_OPEN)
self.startSoundID = soundOK and soundID
end
end)
GarrisonLandingPageMinimapButton:HookScript("OnClick", function(self, b)
- if b == "LeftButton" then
- if IsLandingPageVisible() and not (IsExpansionPageVisible() or self.expansionPageVisiblePriorToClick) and GarrisonLandingPage and GarrisonLandingPage.garrTypeID ~= C.GetLandingPageGarrisonType() then
- ShowLanding(nil, C.GetLandingPageGarrisonType())
+ if self.altMenuManager ~= addonName then
+ return
+ elseif b == "LeftButton" then
+ local goalLanding = IsLandingPageVisible() and not (IsExpansionPageVisible() or self.expansionPageVisiblePriorToClick) and C.GetLandingPageGarrisonType()
+ if goalLanding and GarrisonLandingPage.garrTypeID ~= goalLanding then
+ ShowLanding(nil, goalLanding)
end
return
elseif b == "RightButton" then
if (C.GetLandingPageGarrisonType() or 0) > 3 then
if self.landingVisiblePriorToClick then
ShowLanding(nil, self.landingVisiblePriorToClick)
- else
+ elseif GarrisonLandingPage and GarrisonLandingPage:IsVisible() then
+ if type(GarrisonLandingPage.OnInstantHide) == "function" then
+ securecall(GarrisonLandingPage.OnInstantHide, GarrisonLandingPage)
+ end
HideUIPanel(GarrisonLandingPage)
end
+ local ExpansionLandingPage = GetExpansionLandingPage()
if ExpansionLandingPage and ExpansionLandingPage:IsVisible() and not self.expansionPageVisiblePriorToClick then
+ if type(ExpansionLandingPage.OnInstantHide) == "function" then
+ securecall(ExpansionLandingPage.OnInstantHide, ExpansionLandingPage)
+ end
HideUIPanel(ExpansionLandingPage)
end
if self.startSoundID then
local startID, soundOK, soundID, _ = self.startSoundID, PlaySound(SOUNDKIT.UI_GARRISON_GARRISON_REPORT_OPEN)
StopSound(startID)
_, self.startSoundID = soundOK and soundID and StopSound(soundID), nil
@@ -161,13 +186,13 @@
landingChoiceMenu = CreateFrame("Frame", "MPLandingChoicesDrop", UIParent, "UIDropDownMenuTemplate")
end
landingChoices = wipe(landingChoices or {})
landingChoices[#landingChoices+1] = C.GetNumFollowers(1) > 0 and {text=GARRISON_LANDING_PAGE_TITLE, func=ShowLanding, arg1=2, notCheckable=true} or nil
landingChoices[#landingChoices+1] = C.GetNumFollowers(4) > 0 and {text=ORDER_HALL_LANDING_PAGE_TITLE, func=ShowLanding, arg1=3, notCheckable=true} or nil
landingChoices[#landingChoices+1] = C.GetNumFollowers(22) > 0 and {text=WAR_CAMPAIGN, func=ShowLanding, arg1=9, notCheckable=true} or nil
- landingChoices[#landingChoices+1] = C.GetNumFollowers(123) > 0 and {text=COVENANT_MISSIONS_TITLE, func=ShowLanding, arg1=111, notCheckable=true} or nil
+ landingChoices[#landingChoices+1] = C.GetNumFollowers(123) > 0 and {text=GARRISON_TYPE_9_0_LANDING_PAGE_TITLE, func=ShowLanding, arg1=111, notCheckable=true} or nil
GameTooltip:Hide()
EasyMenu(landingChoices, landingChoiceMenu, "cursor", 0, 0, "MENU", 4)
DropDownList1:ClearAllPoints()
local x, y = self:GetCenter()
local w, h = UIParent:GetSize()
local u, r = y*2 > h, x*2 > w
@@ -178,12 +203,13 @@
ShowLanding(nil, 2)
end
end
self.startSoundID = nil
end)
end
+securecall(hookLandingMenu)
hooksecurefunc("ShowGarrisonLandingPage", function(pg)
pg = (pg or C_Garrison.GetLandingPageGarrisonType() or 0)
if pg < 3 and pg > 0 then
LoadMP()
end
end)War Plan
--- Old 2025-09-26 21:37:32.000000000
+++ New 2025-09-26 21:19:46.000000000
@@ -118,16 +118,17 @@
menuFrame.displayMode = displayMode
end
UIDropDownMenu_Initialize(menuFrame, EasyMenu_Initialize, displayMode, nil, menuList)
ToggleDropDownMenu(1, nil, menuFrame, anchor, x, y, menuList, nil, autoHideDelay)
end
-function EV:I_LOAD_HOOKS()
- TooltipDataProcessor.AddTooltipPostCall(Enum.TooltipDataType.Unit, Tooltip_OnSetUnit)
- GarrisonLandingPageMinimapButton:HookScript("OnEnter", Tooltip_OnLandingEnter)
- if C_AddOns.IsAddOnLoaded("MasterPlanA") then
+local function hookLandingMenu()
+ if GarrisonLandingPageMinimapButton.altMenuManager == nil then
+ GarrisonLandingPageMinimapButton:RegisterForClicks("LeftButtonUp", "RightButtonUp")
+ GarrisonLandingPageMinimapButton.altMenuManager = addonName
+ else
return
end
local followerTabNames = {[2]=GARRISON_FOLLOWERS, [3]=FOLLOWERLIST_LABEL_CHAMPIONS, [9]=FOLLOWERLIST_LABEL_CHAMPIONS, [111]=COVENANT_MISSIONS_FOLLOWERS}
local function ShowLanding(_, page)
HideUIPanel(GarrisonLandingPage)
ShowGarrisonLandingPage(page)
@@ -140,39 +141,55 @@
HideUIPanel(ExpansionLandingPage)
end
end
local function IsLandingPageVisible()
return GarrisonLandingPage and GarrisonLandingPage:IsVisible()
end
+ local function GetExpansionLandingPage()
+ return ExpansionLandingPage and ExpansionLandingPage.replacementLandingPage or PlumberExpansionLandingPage or ExpansionLandingPage or nil
+ end
local function IsExpansionPageVisible()
+ local ExpansionLandingPage = GetExpansionLandingPage()
return ExpansionLandingPage and ExpansionLandingPage:IsVisible()
end
local landingChoiceMenu, landingChoices
- GarrisonLandingPageMinimapButton:RegisterForClicks("LeftButtonUp", "RightButtonUp")
GarrisonLandingPageMinimapButton:HookScript("PreClick", function(self, b)
+ if self.altMenuManager ~= addonName then
+ return
+ end
self.landingVisiblePriorToClick = IsLandingPageVisible() and GarrisonLandingPage and GarrisonLandingPage.garrTypeID
self.expansionPageVisiblePriorToClick = IsExpansionPageVisible()
if b == "RightButton" then
local soundOK, soundID = PlaySound(SOUNDKIT.UI_GARRISON_GARRISON_REPORT_OPEN)
self.startSoundID = soundOK and soundID
end
end)
GarrisonLandingPageMinimapButton:HookScript("OnClick", function(self, b)
- if b == "LeftButton" then
- if IsLandingPageVisible() and not (IsExpansionPageVisible() or self.expansionPageVisiblePriorToClick) and GarrisonLandingPage and GarrisonLandingPage.garrTypeID ~= C.GetLandingPageGarrisonType() then
- ShowLanding(nil, C.GetLandingPageGarrisonType())
+ if self.altMenuManager ~= addonName then
+ return
+ elseif b == "LeftButton" then
+ local goalLanding = IsLandingPageVisible() and not (IsExpansionPageVisible() or self.expansionPageVisiblePriorToClick) and C.GetLandingPageGarrisonType()
+ if goalLanding and GarrisonLandingPage.garrTypeID ~= goalLanding then
+ ShowLanding(nil, goalLanding)
end
return
elseif b == "RightButton" then
if (C.GetLandingPageGarrisonType() or 0) > 3 then
if self.landingVisiblePriorToClick then
ShowLanding(nil, self.landingVisiblePriorToClick)
- else
+ elseif GarrisonLandingPage and GarrisonLandingPage:IsVisible() then
+ if type(GarrisonLandingPage.OnInstantHide) == "function" then
+ securecall(GarrisonLandingPage.OnInstantHide, GarrisonLandingPage)
+ end
HideUIPanel(GarrisonLandingPage)
end
+ local ExpansionLandingPage = GetExpansionLandingPage()
if ExpansionLandingPage and ExpansionLandingPage:IsVisible() and not self.expansionPageVisiblePriorToClick then
+ if type(ExpansionLandingPage.OnInstantHide) == "function" then
+ securecall(ExpansionLandingPage.OnInstantHide, ExpansionLandingPage)
+ end
HideUIPanel(ExpansionLandingPage)
end
if self.startSoundID then
local startID, soundOK, soundID, _ = self.startSoundID, PlaySound(SOUNDKIT.UI_GARRISON_GARRISON_REPORT_OPEN)
StopSound(startID)
_, self.startSoundID = soundOK and soundID and StopSound(soundID), nil
@@ -185,13 +202,13 @@
landingChoiceMenu = CreateFrame("Frame", "WPLandingChoicesDrop", UIParent, "UIDropDownMenuTemplate")
end
landingChoices = wipe(landingChoices or {})
landingChoices[#landingChoices+1] = C.GetNumFollowers(1) > 0 and {text=GARRISON_LANDING_PAGE_TITLE, func=ShowLanding, arg1=2, notCheckable=true} or nil
landingChoices[#landingChoices+1] = C.GetNumFollowers(4) > 0 and {text=ORDER_HALL_LANDING_PAGE_TITLE, func=ShowLanding, arg1=3, notCheckable=true} or nil
landingChoices[#landingChoices+1] = C.GetNumFollowers(22) > 0 and {text=WAR_CAMPAIGN, func=ShowLanding, arg1=9, notCheckable=true} or nil
- landingChoices[#landingChoices+1] = C.GetNumFollowers(123) > 0 and {text=COVENANT_MISSIONS_TITLE, func=ShowLanding, arg1=111, notCheckable=true} or nil
+ landingChoices[#landingChoices+1] = C.GetNumFollowers(123) > 0 and {text=GARRISON_TYPE_9_0_LANDING_PAGE_TITLE, func=ShowLanding, arg1=111, notCheckable=true} or nil
GameTooltip:Hide()
EasyMenu(landingChoices, landingChoiceMenu, "cursor", 0, 0, "MENU", 4)
DropDownList1:ClearAllPoints()
local x, y = self:GetCenter()
local w, h = UIParent:GetSize()
local u, r = y*2 > h, x*2 > w
@@ -202,6 +219,11 @@
ShowLanding(nil, 2)
end
end
self.startSoundID = nil
end)
end
+function EV:I_LOAD_HOOKS()
+ TooltipDataProcessor.AddTooltipPostCall(Enum.TooltipDataType.Unit, Tooltip_OnSetUnit)
+ GarrisonLandingPageMinimapButton:HookScript("OnEnter", Tooltip_OnLandingEnter)
+ hookLandingMenu()
+end