Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[X11] Fixed core X11 scrolling and absolute y motions

  • Loading branch information...
commit ffa3df29ebd902939f262ab2ad0116354dd4990c 1 parent 9ae778a
@thefiddler thefiddler authored
Showing with 3 additions and 1 deletion.
  1. +3 −1 Source/OpenTK/Platform/X11/XI2MouseKeyboard.cs
View
4 Source/OpenTK/Platform/X11/XI2MouseKeyboard.cs
@@ -490,6 +490,8 @@ void ProcessRawEvent(ref XGenericEventCookie cookie)
float dx, dy;
MouseButton button = X11KeyMap.TranslateButton(raw.detail, out dx, out dy);
mouse.State[button] = raw.evtype == XIEventType.RawButtonPress;
+ if (mouse.ScrollX.number == -1 && mouse.ScrollY.number == -1)
+ mouse.State.SetScrollRelative(dx, dy);
}
break;
@@ -554,7 +556,7 @@ unsafe static void ProcessRawMotion(XIMouse d, ref XIRawEvent raw)
d.State.X += (int)Math.Round(x);
else
d.State.X = (int)Math.Round(x);
- if (d.MotionY.mode == XIMode.Absolute)
+ if (d.MotionY.mode == XIMode.Relative)
d.State.Y += (int)Math.Round(y);
else
d.State.Y = (int)Math.Round(y);
Please sign in to comment.
Something went wrong with that request. Please try again.