Skip to content

Commit 4416d11

Browse files
committed
Use GetMouseFoci() on 11.0 clients, fixes #14
1 parent 9335256 commit 4416d11

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

DevTool.lua

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,8 +146,14 @@ function DevTool:CreateChatCommands()
146146
end,
147147

148148
MOUSEOVER = function()
149-
local resultTable = GetMouseFocus()
150-
return resultTable, resultTable:GetName()
149+
local focusedFrame
150+
--WoW 11.0 added GetMouseFoci() which now returns a table of frames in order of their on-screen stacking
151+
if GetMouseFoci then
152+
focusedFrame = GetMouseFoci()[1]
153+
else
154+
focusedFrame = GetMouseFocus()
155+
end
156+
return focusedFrame, focusedFrame:GetName()
151157
end,
152158

153159
REPOSITION = function()

0 commit comments

Comments
 (0)