summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGraeme Geldenhuys <graeme@mastermaths.co.za>2010-09-22 09:25:08 +0200
committerGraeme Geldenhuys <graeme@mastermaths.co.za>2010-09-23 16:24:42 +0200
commita2e6153e83dbc6a8ef8773870bd8e0b1b742fdbf (patch)
tree436343a0b6ba7294fff90947e25074ad8cc88f1d /src
parent1ed2d01072110b37768909afc79e9c18867c7f3d (diff)
downloadfpGUI-a2e6153e83dbc6a8ef8773870bd8e0b1b742fdbf.tar.xz
X11: Only send XdndLeave event if we actually had a FLastTarget window
Diffstat (limited to 'src')
-rw-r--r--src/corelib/x11/fpg_x11.pas6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/corelib/x11/fpg_x11.pas b/src/corelib/x11/fpg_x11.pas
index 2076b358..64df409b 100644
--- a/src/corelib/x11/fpg_x11.pas
+++ b/src/corelib/x11/fpg_x11.pas
@@ -3115,10 +3115,14 @@ begin
lTarget := FindWindow(ev.xmotion.root, ev.xmotion.x_root, ev.xmotion.y_root);
if FLastTarget <> lTarget then
begin
- SendDNDLeave(FLastTarget);
+ if FLastTarget <> 0 then { meaning we had a target before }
+ SendDNDLeave(FLastTarget);
FLastTarget := lTarget;
FTargetIsDNDAware := IsDNDAware(lTarget);
+ {$IFDEF DNDDEBUG}
+ writeln('IsDNDAware = ', BoolToStr(FTargetIsDNDAware, True));
+ {$ENDIF}
FStatusPending := False;
FDropAccepted := False;
FAcceptedAction := X.None;