Mercurial > hg > ucis.core
changeset 39:41b2d01ae458
FBGUI: Fixed cursor handling in forms
author | Ivo Smits <Ivo@UCIS.nl> |
---|---|
date | Wed, 24 Apr 2013 00:30:18 +0200 |
parents | 2e3f57f326b3 |
children | e3329f686b95 |
files | FBGUI/FBGUI.cs |
diffstat | 1 files changed, 5 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- 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;