diff options
author | Graeme Geldenhuys <graemeg@gmail.com> | 2010-09-22 23:10:42 +0200 |
---|---|---|
committer | Graeme Geldenhuys <graeme@mastermaths.co.za> | 2010-09-23 16:24:42 +0200 |
commit | 839de6506d1f7002db3ea045f7a562b1d45d685b (patch) | |
tree | 96aad72f748c38edc6e63d42d50ce7b7514c458a /src | |
parent | a4b14f1174146845b9623240fb3fe780ee50585d (diff) | |
download | fpGUI-839de6506d1f7002db3ea045f7a562b1d45d685b.tar.xz |
confirming XSetSelectionOwner succeeded as per ICCCM specs
Diffstat (limited to 'src')
-rw-r--r-- | src/corelib/x11/fpg_x11.pas | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/corelib/x11/fpg_x11.pas b/src/corelib/x11/fpg_x11.pas index 549c6a80..e92caea4 100644 --- a/src/corelib/x11/fpg_x11.pas +++ b/src/corelib/x11/fpg_x11.pas @@ -3332,7 +3332,7 @@ end; function TfpgX11Drag.Execute(const ADropActions: TfpgDropActions; const ADefaultAction: TfpgDropAction): TfpgDropAction; var - r: cint; + win: TWindow; begin if FDragging then Result := daIgnore @@ -3342,8 +3342,10 @@ begin xia_plain_text := XInternAtom(xapplication.Display, 'text/plain', TBool(False)); FProposedAction := xapplication.GetAtomFromDropAction(ADefaultAction); xapplication.Drag := self; - r := XSetSelectionOwner(xapplication.Display, xapplication.XdndSelection, FSource.WinHandle, CurrentTime); - writeln('XSetSelectionOwner returned = ', r); + XSetSelectionOwner(xapplication.Display, xapplication.XdndSelection, FSource.WinHandle, CurrentTime); + win := XGetSelectionOwner(xapplication.Display, xapplication.XdndSelection); + if win <> FSource.WinHandle then + raise Exception.Create('Application failed to aquire selection owner status'); end; end; |