# HG changeset patch # User Ivo Smits # Date 1366756218 -7200 # Node ID 41b2d01ae4586dfaa7f2d0d4752dc0ea6580980f # Parent 2e3f57f326b379965b4778c1a34a573201a2395c FBGUI: Fixed cursor handling in forms diff -r 2e3f57f326b3 -r 41b2d01ae458 FBGUI/FBGUI.cs --- a/FBGUI/FBGUI.cs Sun Apr 21 19:41:19 2013 +0200 +++ b/FBGUI/FBGUI.cs Wed Apr 24 00:30:18 2013 +0200 @@ -872,11 +872,10 @@ } } protected override void HandlePointingEvent(FBGPointingEvent e) { - e.Cursor = Cursor; + if (Cursor != null) e.Cursor = Cursor; if (HandlePointingEventA(e)) base.HandlePointingEvent(e); } Boolean HandlePointingEventA(FBGPointingEvent e) { - e.Cursor = Cursor; switch (e.Type) { case FBGPointingEventType.Move: return MouseMove(e.Position, e.Buttons, e); case FBGPointingEventType.ButtonDown: return MouseDown(e.Position, e.Buttons, e); @@ -898,8 +897,10 @@ } } Boolean MouseMove(Point position, MouseButtons buttons, FBGPointingEvent e) { - SetCursorForNonClientOperation(moveresize == 0 ? GetNonClientOperation(position) : moveresize, e); - if (moveresize == 0) return true; + NonClientOps mr = moveresize; + if (mr == 0) mr = GetNonClientOperation(position); + if (mr == 0) return true; + SetCursorForNonClientOperation(mr, e); if ((moveresize & NonClientOps.MoveResize) != 0) { Rectangle b = Bounds; int dx = position.X - prevPosition.X;