From d8bf9da55f130eb8d70d097c40734f5e18a5762f Mon Sep 17 00:00:00 2001 From: Graeme Geldenhuys Date: Wed, 22 Sep 2010 23:13:45 +0200 Subject: X11: reset the mouse cursor after a DND drop action is complete --- src/corelib/x11/fpg_x11.pas | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/corelib/x11/fpg_x11.pas b/src/corelib/x11/fpg_x11.pas index cc360b2d..40686f18 100644 --- a/src/corelib/x11/fpg_x11.pas +++ b/src/corelib/x11/fpg_x11.pas @@ -3283,6 +3283,7 @@ begin xev.xclient.data.l[4] := 0; XSendEvent(xapplication.Display, FLastTarget, False, NoEventMask, @xev); + FSource.MouseCursor := mcDefault; end; procedure TfpgX11Drag.HandleDNDStatus(ATarget: TWindow; AAccept: integer; @@ -3295,14 +3296,12 @@ begin begin FDropAccepted := True; FAcceptedAction := AAction; - { TODO: Change mouse cursor to show drop accepted/valid } FSource.MouseCursor := mcDrag; end else begin FDropAccepted := False; FAcceptedAction := X.None; - { TODO: change mouse cursor to show drop not valid } FSource.MouseCursor := mcNoDrop; end; end; @@ -3331,6 +3330,12 @@ begin Result := FSource; end; +destructor TfpgX11Drag.Destroy; +begin + FSource.MouseCursor := mcDefault; + inherited Destroy; +end; + function TfpgX11Drag.Execute(const ADropActions: TfpgDropActions; const ADefaultAction: TfpgDropAction): TfpgDropAction; var -- cgit v1.2.3-70-g09d2