Repository navigation
Keep Blizzard menus out of the gamepad UI (SetPreferredGamepadInteractTarget taint) - #203
Merged
Merged
Conversation
In Forever's gamepad UI the tracking menus (minimap button, world map button) and the minimap tracker chooser were Blizzard dropdowns opened from GatherLite's own click handlers. Their controller bindings are then registered from addon code, and closing the menu later makes Blizzard's binding stack call SetPreferredGamepadInteractTarget() blamed on GatherLite: ADDON_ACTION_FORBIDDEN, and controller input stays broken until /reload (Wuild#197). In the gamepad UI the tracking shortcuts now open the matching settings category of the GatherLite window (new optional argument of Window:ShowSettings), the minimap tracker reminder enables the first tracker the minimap filters show instead of opening a menu, and the minimap button's right click no longer calls Blizzard's menu manager. Mouse and keyboard play is unchanged.
The window's breadcrumb arrows are Blizzard DropdownButtons. Clicking one with the mouse in the gamepad UI opened a Blizzard menu from an addon-owned button, the same taint path as the tracking menus. The controller already opens the addon-owned menu, so the arrows now ignore the mouse while the gamepad UI is active and keep the native dropdowns otherwise.
Owner
|
Unfortunatly i dont have access to a controller, so please test and verify this. |
Contributor
Author
|
@Wuild just tested in the game. Fix confirmed |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Addresses #197 (
ADDON_ACTION_FORBIDDENforSetPreferredGamepadInteractTarget()in the gamepad UI).Cause
In WoW Forever's gamepad UI, GatherLite opened three Blizzard dropdown menus from its own click handlers: the minimap button's tracking menu, the world map button's tracking menu and the minimap tracker chooser. A Blizzard menu registers its controller bindings when it opens, so with this addon on the stack those bindings are written by addon code. Closing the menu later makes Blizzard's binding stack (
InputBindingManager:RemoveSet->GamepadMainActionBarFrameMixin:UpdateInteractIcons) call the protectedSetPreferredGamepadInteractTarget(), which the client blames on GatherLite. Controller input then stays broken until/reload. The traces in #197 end exactly there (Menu.luaCloseMenus->FrameControlsManager->RemoveSet).The window's own controller input already stays out of Blizzard's binding stack (
docs/window-navigation.md); the menus were the remaining path in.Change
In the gamepad UI only (
InputUtil.IsGamepadUIEnabled() == true, checked on every call):Window:ShowSettingstakes an optional category.DropdownButtons) ignore the mouse, so they cannot open a Blizzard menu; the controller keeps using the addon-owned breadcrumb menu.Mouse and keyboard play is unchanged.
Checks
tools/test_tracking.lua,tools/test_gathering_tracking.luaandtools/test_routes.luacover the gamepad UI (no Blizzard menu, no menu manager call, right settings category, first filtered-in tracker, breadcrumb arrows) and the unchanged mouse and keyboard UI. The new cases fail without the change.test_map_hover,test_openmapandtest_compatstill pass (run under Lua 5.1).