Skip to content

Commit

Permalink
chore: make a stronger assumption about XI2 versions
Browse files Browse the repository at this point in the history
  • Loading branch information
ramezgerges committed Oct 9, 2024
1 parent 49c0456 commit 76a8a1a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/Uno.UI.Runtime.Skia.X11/X11XamlRootHost.XInput.cs
Original file line number Diff line number Diff line change
Expand Up @@ -84,12 +84,12 @@ internal partial class X11XamlRootHost
{
private enum XIVersion
{
Unsupported,
XI2_0,
XI2_1,
XI2_2,
XI2_3,
XI2_4,
Unsupported
XI2_4
}

// These should match X11XamlRootHost.EventsHandledByXI2Mask
Expand Down
4 changes: 3 additions & 1 deletion src/Uno.UI.Runtime.Skia.X11/X11XamlRootHost.cs
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,9 @@ private void Initialize()
? CreateGLXWindow(topWindowDisplay, screen, size, RootX11Window.Window)
: CreateSoftwareRenderWindow(topWindowDisplay, screen, size, RootX11Window.Window);

var usingXi2 = GetXI2Details(display).version is not XIVersion.Unsupported;
// Only XI2.2 has touch events, and that's pretty much the only reason we're using XI2,
// so to make our assumptions simpler, we assume XI >= 2.2 or no XI at all.
var usingXi2 = GetXI2Details(display).version >= XIVersion.XI2_2;
if (usingXi2)
{
SetXIEventMask(TopX11Window);
Expand Down

0 comments on commit 76a8a1a

Please sign in to comment.