From ba4e19bd5a09ac02a81db47f804af11ef2821014 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Bruyère Date: Sat, 10 Apr 2021 02:13:37 +0200 Subject: DebugLogAnalyzer StickyMouse bug --- Samples/DebugLogAnalyzer/src/DebugInterface.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'Samples/DebugLogAnalyzer/src/DebugInterface.cs') diff --git a/Samples/DebugLogAnalyzer/src/DebugInterface.cs b/Samples/DebugLogAnalyzer/src/DebugInterface.cs index 8300abb2..26a1eddf 100644 --- a/Samples/DebugLogAnalyzer/src/DebugInterface.cs +++ b/Samples/DebugLogAnalyzer/src/DebugInterface.cs @@ -32,6 +32,7 @@ namespace Crow string source; Action delRegisterForRepaint;//call RegisterForRepaint in the container widget (DebugInterfaceWidget) Action delSetCurrentException; + Func delGetScreenCoordinate; void interfaceThread () { while (!Terminate) { @@ -68,6 +69,7 @@ namespace Crow Type t = w.GetType(); delRegisterForRepaint = (Action)Delegate.CreateDelegate(typeof(Action), w, t.GetMethod("RegisterForRepaint")); delSetCurrentException = (Action)Delegate.CreateDelegate(typeof(Action), w, t.GetProperty("CurrentException").GetSetMethod()); + delGetScreenCoordinate = (Func)Delegate.CreateDelegate(typeof(Func), w, t.GetMethod("GetScreenCoordinates")); } public void ResetDirtyState () { IsDirty = false; @@ -109,6 +111,11 @@ namespace Crow g.RegisterForLayouting (LayoutingType.All); RegisterClip (clientRectangle); } - } + } + public override void ForceMousePosition() + { + Point p = (Point)delGetScreenCoordinate(); + Glfw.Glfw3.SetCursorPosition (WindowHandle, p.X + MousePosition.X, p.Y + MousePosition.Y); + } } } \ No newline at end of file -- cgit v1.3.1-4-g156e