diff options
author | Graeme Geldenhuys <graemeg@gmail.com> | 2010-09-22 23:13:45 +0200 |
---|---|---|
committer | Graeme Geldenhuys <graeme@mastermaths.co.za> | 2010-09-23 16:24:42 +0200 |
commit | d8bf9da55f130eb8d70d097c40734f5e18a5762f (patch) | |
tree | d14babea1f6902972f317e82bdedb04682e32304 | |
parent | 109a2714ca1846e368f9a83f49d21e028ec950ea (diff) | |
download | fpGUI-d8bf9da55f130eb8d70d097c40734f5e18a5762f.tar.xz |
X11: reset the mouse cursor after a DND drop action is complete
-rw-r--r-- | src/corelib/x11/fpg_x11.pas | 9 |
1 files 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 |