Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

core: Fix contextual ping on header children #661

Merged
merged 1 commit into from
Oct 31, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 12 additions & 9 deletions ouf.lua
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,16 @@ local function initObject(unit, style, styleFunc, header, ...)
object:SetAttribute('*type2', 'togglemenu')
object:SetAttribute('toggleForVehicle', true)

--[[ frame.IsPingable
This boolean can be set to false to disable the frame from being pingable. Enabled by default.
--]]
--[[ Override: frame:GetContextualPingType()
Used to define which contextual ping is used for the frame.

By default this wraps `C_Ping.GetContextualPingTypeForUnit(UnitGUID(frame.unit))`.
--]]
object:SetAttribute('ping-receiver', true)

if(isEventlessUnit(objectUnit)) then
oUF:HandleEventlessUnit(object)
else
Expand Down Expand Up @@ -346,15 +356,6 @@ local function initObject(unit, style, styleFunc, header, ...)
func(object)
end

--[[ frame.IsPingable
This boolean can be set to false to disable the frame from being pingable. Enabled by default.
--]]
--[[ Override: frame:GetContextualPingType()
Used to define which contextual ping is used for the frame.

By default this wraps `C_Ping.GetContextualPingTypeForUnit(UnitGUID(frame.unit))`.
--]]
object:SetAttribute('ping-receiver', true)
Mixin(object, PingableType_UnitFrameMixin)

-- Make Clique kinda happy
Expand Down Expand Up @@ -605,6 +606,8 @@ do
frame:SetAttribute('*type1', 'target')
frame:SetAttribute('*type2', 'togglemenu')
frame:SetAttribute('oUF-guessUnit', unit)

frame:SetAttribute('ping-receiver', true)
end

local body = header:GetAttribute('oUF-initialConfigFunction')
Expand Down