uno
uno copied to clipboard
Mouse wheel input is unreliable in multiwindow
@MartinZikmund If you are going to look into multiwindow issue please also check the mouse wheel event on the second monitor. What I saw when testing the Mapsui issue is that on the second monitor the mouse wheel event only fired on the top left of the screen (about 1/16th of the total surface).
Originally posted by @pauldendulk in https://github.com/unoplatform/uno/issues/15601#issuecomment-1963677445
@pauldendulk was this on WPF or GTK?
We use the SKXamlCanvas (is that WPF?).
I meant which Uno Platform target you are experiencing issues on (YourApp.Skia Wpf/YourApp.Skia Gtk/something else?)
I was running Mapsui.Samples.Uno.WinUI.Windows on Windows, this one.
Oh, that seems like a WinUI bug then (Uno Platform does not "exist" on Windows target) - I think the issue will need to be reported on Microsoft's WinUI repo
This means the bug should also exist in the plain WinUI target. This one: https://github.com/Mapsui/Mapsui/tree/main/Mapsui.UI.WinUI. I can test that next week. It might also be related to the SkiaSharp control we use.
I tested it on plain WinUI but I do not see there problem there. The Mapsui code is 100% shared between Mapsui.WinUI and Mapsui.Uno.WinUI, so it is somehow related to Uno.
The problem can be reproduced on my laptop screen if the Scale of the monitor is not set to 100%. It is not related to second or first monitor (which makes it a simpler problem I guess).
It might be related to SkiaSharp.Views.Uno.WinUI.SKXamlCanvas somehow. Although the mouse wheel event is attached to the page and not to the canvas, still I did notice in other experiments that the child can influence the parents mouse wheel events.
@MartinZikmund could it be related to https://github.com/unoplatform/uno.templates/blob/548712a42cead980526bf41996d2863f9d2a080c/src/Uno.Templates/content/unoapp/MyExtensionsApp.1.Windows/app.manifest#L22 ?
We also have a Uno warning: Uno0001 PointerWheelChanged is not implemented in Uno. My original thought that this applies to iOS and Android, but perhaps it is related to this problem on Windows.
@dr1rrb do we not have support for this across platforms? It may just be that event that is marked as not implemented, but actually is working.
@MartinZikmund could it be related to unoplatform/uno.templates@
548712a
/src/Uno.Templates/content/unoapp/MyExtensionsApp.1.Windows/app.manifest#L22 ?
I see the default WinUI3 template has a simpler app.manifest
now:
<?xml version="1.0" encoding="utf-8"?>
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">
<assemblyIdentity version="1.0.0.0" name="App77.app"/>
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
<application>
<!-- The ID below informs the system that this application is compatible with OS features first introduced in Windows 10.
It is necessary to support features in unpackaged applications, for example the custom titlebar implementation.
For more info see https://docs.microsoft.com/windows/apps/windows-app-sdk/use-windows-app-sdk-run-time#declare-os-compatibility-in-your-application-manifest -->
<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}" />
</application>
</compatibility>
<application xmlns="urn:schemas-microsoft-com:asm.v3">
<windowsSettings>
<dpiAwareness xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">PerMonitorV2</dpiAwareness>
</windowsSettings>
</application>
</assembly>
@pauldendulk can you try replacing the one we generate with this one to see if there is any improvement?
@dr1rrb do we not have support for this across platforms? It may just be that event that is marked as not implemented, but actually is working.
It is marked as not implemented on non-WASM and -Skia targets, which is correct currently
I pasted in the code as you suggested but see no difference. The next thing would be to make a minimal sample without Mapsui and only the SkiaViews and a mouse wheel event. I wanted to do this last weeks but could not find for it and probably won't the coming weeks.