File tree 2 files changed +9
-4
lines changed
2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -494,7 +494,7 @@ private void AddKeyBindingsHotKey (MenuBarItem? menuBarItem)
494
494
495
495
private void Application_RootMouseEvent ( object ? sender , MouseEventArgs a )
496
496
{
497
- if ( a . View is { } and ( MenuBar or not Menu ) )
497
+ if ( ! _host . _handled && ! _host . HandleGrabView ( a , this ) )
498
498
{
499
499
return ;
500
500
}
Original file line number Diff line number Diff line change @@ -1578,11 +1578,16 @@ internal bool HandleGrabView (MouseEventArgs me, View current)
1578
1578
&& me . Flags != MouseFlags . ReportMousePosition
1579
1579
&& me . Flags != 0 )
1580
1580
{
1581
- Application . UngrabMouse ( ) ;
1581
+ var parent = me . View is Adornment adornment ? adornment . Parent : me . View ;
1582
1582
1583
- if ( IsMenuOpen )
1583
+ if ( GetTopSuperView ( ) == parent ? . GetTopSuperView ( ) )
1584
1584
{
1585
- CloseAllMenus ( ) ;
1585
+ Application . UngrabMouse ( ) ;
1586
+
1587
+ if ( IsMenuOpen )
1588
+ {
1589
+ CloseAllMenus ( ) ;
1590
+ }
1586
1591
}
1587
1592
1588
1593
_handled = false ;
You can’t perform that action at this time.
0 commit comments