Repository navigation
Conversation
## What does this PR do? Fixes Shifter bringing back Blizzard windows that are kept open but deliberately hidden (https://ellesmereui.com/bugs/366). Some windows have to stay shown while hidden, because their events and server session are still needed, so they are moved far off screen or scaled down to almost nothing. Shifter brought them back into view, often raised above other windows, where they caught clicks meant for those windows. Cause: Shifter treats every window it manages the same way, whether it is visible or not. - `HookFrame` turns on screen clamping for each window, so a window placed off screen is pulled back to the screen edge, even if it was never moved with Shifter. - The `SetPoint` and `SetScale` hooks re-apply the saved position and scale after any outside change, which undoes the hide. - The `OnShow` paths lift the strata and `Raise()` the window above the others. Fix: Shifter now recognises a hidden window and leaves it alone until it comes back. - `IsParked` detects a window anchored far beyond the screen or lying entirely off it, and `IsHiddenByScale` detects a scale far below anything Shifter itself sets. - `SyncParkState` checks this in the `SetPoint` hook for outside changes only (after the `_shIgnoreSP` guard), stores the result on the frame data, and switches the screen clamp off while the window is hidden. - While a window is hidden, `ApplyPosition`, `ApplyScale`, `ShouldDock` and the `OnShow` raise all return early. - When the window is placed back on screen, the clamp, the saved scale and the saved position are restored. A saved position that ends up off screen is still pulled back by the clamp as before. Cost: one `GetPoint` and a little arithmetic per `SetPoint` on a Shifter-managed window, with no allocations. Nothing changes while Shifter is disabled at login. ## How was it tested? Client: Retail and Forever - Opened a profession window, a merchant and the auction house while their Blizzard windows were kept shown but hidden off screen (the auction house also scaled down): they stayed hidden and caught no clicks. - Same with those windows previously moved with Shifter: they stayed hidden, and came back at the saved position and scale once shown normally again. - Moved and scaled other Shifter windows (character frame, default positions): unchanged. - Guardrails and the locale-key check pass. ## Checklist - [x] New settings default **OFF** (no behavior change without opt-in) - N/A, no new settings - [x] Zero cost while disabled: no events registered, no polling, no hooks doing work, no tickers; nothing built beyond an inert event frame or combat queue - [x] Cheap while enabled: event-driven (no polling, no timer-based logic, no per-frame allocations) - [x] No writes onto Blizzard-owned frames (weak-table pattern used); `HookScript`/`hooksecurefunc` only, never `SetScript` on Blizzard frames - [x] Tested in-game on live; no version gates or pre-Midnight APIs added
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.
What does this PR do?
Fixes Shifter bringing back Blizzard windows that are kept open but deliberately hidden (https://ellesmereui.com/bugs/366). Some windows have to stay shown while hidden, because their events and server session are still needed, so they are moved far off screen or scaled down to almost nothing. Shifter brought them back into view, often raised above other windows, where they caught clicks meant for those windows.
Cause: Shifter treats every window it manages the same way, whether it is visible or not.
HookFrameturns on screen clamping for each window, so a window placed off screen is pulled back to the screen edge, even if it was never moved with Shifter.SetPointandSetScalehooks re-apply the saved position and scale after any outside change, which undoes the hide.OnShowpaths lift the strata andRaise()the window above the others.Fix: Shifter now recognises a hidden window and leaves it alone until it comes back.
IsParkeddetects a window anchored far beyond the screen or lying entirely off it, andIsHiddenByScaledetects a scale far below anything Shifter itself sets.SyncParkStatechecks this in theSetPointhook for outside changes only (after the_shIgnoreSPguard), stores the result on the frame data, and switches the screen clamp off while the window is hidden.ApplyPosition,ApplyScale,ShouldDockand theOnShowraise all return early.Cost: one
GetPointand a little arithmetic perSetPointon a Shifter-managed window, with no allocations. Nothing changes while Shifter is disabled at login.How was it tested?
Client: Retail and Forever
Checklist
HookScript/hooksecurefunconly, neverSetScripton Blizzard frames