WinFormsAvaloniaControlHost
blocks access to parent window
#16526
Labels
WinFormsAvaloniaControlHost
blocks access to parent window
#16526
Describe the bug
Mouse clicks only work inside of the Avalonia control. Clicking a Windows Forms
Button
does nothing anymore and even the native window buttons like minimize, maximize and close do not work. Windows Forms seems to get the mouse move information, as hover animations work but the click event seems not to arrive.Furthermore, when pressing
Alt+F4
the Avalonia control closes, instead of this key code being handled by Windows Forms.To Reproduce
Expected behavior
When clicking outside of the Avalonia control, clicks should be handled by Windows Forms and perform actions. Furthermore,
Alt+F4
should be handled by Windows Forms and close the hosting application (by default).Avalonia version
11.1.1
OS
Windows
Additional context
This is a regression introduced in 11.1.0. The same code worked with Avalonia 11.0.11 before. The current master branch, i.e. 11.2.999-cibuild0050568-alpha also works.
One more interesting fact: When testing with
samples/interop/WindowsInteropTest
from this repository at tag 11.1.1, I could not reproduce the click issue but the behavior ofAlt+F4
was still wrong. At master, i.e. 78935ba everything was fine again.The text was updated successfully, but these errors were encountered: