Skip to content

Commit

Permalink
Fix for the switch between GetMouseFocus and GetMouseFoci (thanks fre…
Browse files Browse the repository at this point in the history
…ite!)
  • Loading branch information
GovtGeek committed Oct 7, 2024
1 parent 8271bfe commit 79b2606
Showing 1 changed file with 17 additions and 5 deletions.
22 changes: 17 additions & 5 deletions Libraries/LibDropdown-1.0.lua
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ local wipe = wipe
local CreateFrame = CreateFrame
local PlaySound = PlaySound
local ShowUIPanel = ShowUIPanel
local GetMouseFocus = GetMouseFocus
--local GetMouseFocus = GetMouseFocus
local UISpecialFrames = UISpecialFrames

local ChatFrame1 = ChatFrame1
Expand Down Expand Up @@ -212,10 +212,22 @@ local function ReleaseInput(input)
end

local function MouseOver(frame)
local f = GetMouseFocus()
while f and f ~= UIParent do
if f == frame then return true end
f = f:GetParent()
if _G["GetMouseFocus"] then
local f = GetMouseFocus()
while f and f ~= UIParent do
if f == frame then return true end
f = f:GetParent()
end
else
local mouseFoci = GetMouseFoci()
for _, f in ipairs(mouseFoci) do
while f do
if f == frame then
return true
end
f = f:GetParent()
end
end
end
return false
end
Expand Down

0 comments on commit 79b2606

Please sign in to comment.