Conversation
|
All contributors have signed the CLA ✍️ ✅ |
Author
|
I have read the CLA Document and I hereby sign the CLA |
The overlay window never activates, so the context menu gets no deactivation to dismiss itself on. It was closed from a MouseLeave handler that was only attached after the cursor had entered the menu, so a menu the cursor never entered stayed open indefinitely, even after its window was gone. Poll the real cursor location while the menu is open and close it once the cursor has left both the menu and its button. IsMouseOver cannot be used because the open menu captures the mouse. Also close the menu when the control is unloaded, and keep the actions bar visible for as long as the menu is open.
SQReder
force-pushed
the
feat/close-more-menu
branch
from
September 21, 2026 15:32
7824f7f to
fe15212
Compare
This branch has not been deployed
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.
Context
The "more options" menu of the window actions bar (add floating rule for process / window class) is very hard to dismiss without picking an item, and can stay on screen after its window is gone.
The overlay window is created with
WS_EX_NOACTIVATE, so theContextMenunever gets a deactivation to close itself on. The existing workaround closes it from aMouseLeavehandler that is only attached after the cursor has entered the menu, so a menu the cursor never entered stays open indefinitely. Nothing closed it when the control was removed either.Changes
IsMouseOvercannot be used here: the open menu captures the mouse, and WPF then reports the capturing element as the one under the cursor.TilingWindowcontrol is unloaded.TilingWindowViewModel.IsMenuOpen), and re-evaluate its visibility from the current cursor location when the menu closes, since the cursor may be resting far away by then.MouseEnter/MouseLeaveworkaround.Verification
dotnet build FancyWM.GUI(Debug) — 0 errors.Risks
🤖 Generated with Claude Code