From f0e29069a97b5ce417dd8d5d591bf53246e1d09a Mon Sep 17 00:00:00 2001 From: daboe01 Date: Fri, 26 Dec 2025 12:06:18 +0100 Subject: [PATCH 1/2] fixed: sticky main menu selection issue --- AppKit/CPMenu/_CPMenuBarWindow.j | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/AppKit/CPMenu/_CPMenuBarWindow.j b/AppKit/CPMenu/_CPMenuBarWindow.j index 513ec2049..614e2c9f7 100644 --- a/AppKit/CPMenu/_CPMenuBarWindow.j +++ b/AppKit/CPMenu/_CPMenuBarWindow.j @@ -471,6 +471,11 @@ return index; } + // If the mouse is within the menu bar bounds but not over an item + // (e.g. dragging far left or right), force the menu to unhighlight. + if (CGRectContainsPoint([self bounds], aPoint)) + [_menu _highlightItemAtIndex:CPNotFound]; + return CPNotFound; } From dda325b51b83a711b3f9c51cd0fe3300ee4d3c2f Mon Sep 17 00:00:00 2001 From: daboe01 Date: Fri, 26 Dec 2025 12:09:15 +0100 Subject: [PATCH 2/2] fixed: wrong target for bounds --- AppKit/CPMenu/_CPMenuBarWindow.j | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AppKit/CPMenu/_CPMenuBarWindow.j b/AppKit/CPMenu/_CPMenuBarWindow.j index 614e2c9f7..ce916d5cf 100644 --- a/AppKit/CPMenu/_CPMenuBarWindow.j +++ b/AppKit/CPMenu/_CPMenuBarWindow.j @@ -473,7 +473,7 @@ // If the mouse is within the menu bar bounds but not over an item // (e.g. dragging far left or right), force the menu to unhighlight. - if (CGRectContainsPoint([self bounds], aPoint)) + if (CGRectContainsPoint([[self contentView] bounds], aPoint)) [_menu _highlightItemAtIndex:CPNotFound]; return CPNotFound;