Skip to content

Commit

Permalink
fix: can't click anything in the world in 11.1
Browse files Browse the repository at this point in the history
  • Loading branch information
ascott18 committed Jan 9, 2025
1 parent 25569cb commit 4387684
Show file tree
Hide file tree
Showing 11 changed files with 27 additions and 12 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## v11.1.0
* Fixes for WoW 11.1

## v11.0.13
* Fix: #2250 - Currency checking error in Cata clasic

Expand Down
4 changes: 2 additions & 2 deletions Components/Core/Common/IconDragger.lua
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ TMW.IconDragger = IconDragger


function IconDragger:OnInitialize()
WorldFrame:HookScript("OnMouseDown", function() -- this contains other bug fix stuff too
TMW:RegisterCallback("TMW_WORLD_FRAME_MOUSE_DOWN", function()
IconDragger.DraggerFrame:Hide()
IconDragger.IsDragging = nil
end)
Expand Down Expand Up @@ -102,7 +102,7 @@ function IconDragger:CompleteDrag(script, icon)
IconDragger:ScheduleTimer("SetIsDraggingFalse", 0.1)

-- icon is the destination
icon = icon or (GetMouseFoci and GetMouseFoci()[1] or GetMouseFocus())
icon = icon or TMW.GetMouseFocus() or WorldFrame

if IconDragger.IsDragging then

Expand Down
5 changes: 5 additions & 0 deletions Components/Core/Utils.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1353,6 +1353,11 @@ end
-- WoW API Helpers
---------------------------------

local GetMouseFoci = GetMouseFoci
TMW.GetMouseFocus = GetMouseFocus or function()
return GetMouseFoci()[1]
end

function TMW.GetRuneCooldownDuration()
-- Round to a precision of 3 decimal points for comparison with returns from GetSpellCooldown
local _, duration = GetRuneCooldown(1)
Expand Down
3 changes: 1 addition & 2 deletions Components/IconModules/IconModule_GroupMover/module.lua
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,7 @@ end)
-- Sometimes, if a group/icon does some things to itself while moving
-- (Hiding/Showing seems to trigger this), OnDragStop won't fire when it should.
-- Having these here makes sure that the user doesn't get a group permanantly stuck to their cursor.

WorldFrame:HookScript("OnMouseDown", function(WorldFrame, button)
TMW:RegisterCallback("TMW_WORLD_FRAME_MOUSE_DOWN", function()
if isMoving then
stopMoving(isMoving)
end
Expand Down
3 changes: 3 additions & 0 deletions Options/CHANGELOG.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ if not TMW then return end
TMW.CHANGELOG_LASTVER="10.0.0"

TMW.CHANGELOG = [==[
## v11.1.0
* Fixes for WoW 11.1
## v11.0.13
* Fix: #2250 - Currency checking error in Cata clasic
Expand Down
3 changes: 1 addition & 2 deletions Options/TMWUIDropDownMenu.lua
Original file line number Diff line number Diff line change
Expand Up @@ -740,8 +740,7 @@ function DD:GetScrollable()
return self.scrollable
end


WorldFrame:HookScript("OnMouseDown", function()
TMW:RegisterCallback("TMW_WORLD_FRAME_MOUSE_DOWN", function()
DD:CloseDropDownMenus()
end)

Expand Down
4 changes: 2 additions & 2 deletions Options/TellMeWhen_Options.lua
Original file line number Diff line number Diff line change
Expand Up @@ -267,8 +267,8 @@ function IE:OnInitialize()
-- WoW 11.0+
hooksecurefunc(C_SpellBook, "PickupSpellBookItem", function(...) IE.DraggingInfo = {...} end)
end

WorldFrame:HookScript("OnMouseDown", function()
TMW:RegisterCallback("TMW_WORLD_FRAME_MOUSE_DOWN", function()
IE.DraggingInfo = nil
end)
hooksecurefunc("ClearCursor", IE.BAR_HIDEGRID)
Expand Down
2 changes: 1 addition & 1 deletion TellMeWhen-Cata.toc
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
## X-WoWI-ID: 10855
## X-Wago-ID: ZQ6aZqKW

## Version: 11.0.13
## Version: 11.1.0
## Author: Cybeloras of Aerie Peak
## IconTexture: Interface\Addons\TellMeWhen\Textures\LDB Icon
## AddonCompartmentFunc: TellMeWhen_OnAddonCompartmentClick
Expand Down
2 changes: 1 addition & 1 deletion TellMeWhen-Classic.toc
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
## X-WoWI-ID: 10855
## X-Wago-ID: ZQ6aZqKW

## Version: 11.0.13
## Version: 11.1.0
## Author: Cybeloras of Aerie Peak
## IconTexture: Interface\Addons\TellMeWhen\Textures\LDB Icon
## AddonCompartmentFunc: TellMeWhen_OnAddonCompartmentClick
Expand Down
8 changes: 7 additions & 1 deletion TellMeWhen.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1091,6 +1091,7 @@ function TMW:PLAYER_LOGIN()
TMW:UpdateTalentTextureCache()


TMW:RegisterEvent("GLOBAL_MOUSE_DOWN")

if C_BarberShop then
TMW:RegisterEvent("BARBER_SHOP_OPEN")
Expand Down Expand Up @@ -2970,7 +2971,12 @@ function TMW:BARBER_SHOP_CLOSE()
TMW:Show()
end


function TMW:GLOBAL_MOUSE_DOWN(button)
local mouseFocus = TMW.GetMouseFocus()
if not mouseFocus or mouseFocus == WorldFrame then
TMW:Fire("TMW_WORLD_FRAME_MOUSE_DOWN", button)
end
end



Expand Down
2 changes: 1 addition & 1 deletion TellMeWhen.toc
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
## X-WoWI-ID: 10855
## X-Wago-ID: ZQ6aZqKW

## Version: 11.0.13
## Version: 11.1.0
## Author: Cybeloras of Aerie Peak
## IconTexture: Interface\Addons\TellMeWhen\Textures\LDB Icon
## AddonCompartmentFunc: TellMeWhen_OnAddonCompartmentClick
Expand Down

0 comments on commit 4387684

Please sign in to comment.