File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11local MAJOR = " LibDropdown-1.0"
2- local MINOR = 3
2+ local MINOR = 2024
33
44local lib = LibStub :NewLibrary (MAJOR , MINOR )
55if not lib then return end
@@ -1193,13 +1193,24 @@ local t = {
11931193--[[ function testlibdropdown()
11941194 LibStub("LibDropdown-1.0"):OpenAce3Menu(t)
11951195end]]
1196+ if UIDropDownMenu_HandleGlobalMouseEvent then
1197+ hooksecurefunc (" UIDropDownMenu_HandleGlobalMouseEvent" , function (button , event )
1198+ if openMenu and event == " GLOBAL_MOUSE_DOWN" and (button == " LeftButton" or button == " RightButton" ) then
1199+ for i = 0 , frameCount - 1 do
1200+ if _G [" LibDropdownFrame" .. i ]:IsMouseOver () then return end
1201+ end
11961202
1197- hooksecurefunc (" UIDropDownMenu_HandleGlobalMouseEvent" , function (button , event )
1198- if openMenu and event == " GLOBAL_MOUSE_DOWN" and (button == " LeftButton" or button == " RightButton" ) then
1199- for i = 0 , frameCount - 1 do
1200- if _G [" LibDropdownFrame" .. i ]:IsMouseOver () then return end
1203+ openMenu :Release ()
12011204 end
1205+ end )
1206+ else
1207+ lib .mousecallback = EventRegistry :RegisterFrameEventAndCallback (" GLOBAL_MOUSE_DOWN" ,function (ownerID ,button )
1208+ if openMenu and (button == " LeftButton" or button == " RightButton" ) then
1209+ for i = 0 , frameCount - 1 do
1210+ if _G [" LibDropdownFrame" .. i ]:IsMouseOver () then return end
1211+ end
12021212
1203- openMenu :Release ()
1204- end
1205- end )
1213+ openMenu :Release ()
1214+ end
1215+ end )
1216+ end
You can’t perform that action at this time.
0 commit comments