summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGraeme Geldenhuys <graemeg@gmail.com>2010-09-22 23:10:42 +0200
committerGraeme Geldenhuys <graeme@mastermaths.co.za>2010-09-23 16:24:42 +0200
commit839de6506d1f7002db3ea045f7a562b1d45d685b (patch)
tree96aad72f748c38edc6e63d42d50ce7b7514c458a /src
parenta4b14f1174146845b9623240fb3fe780ee50585d (diff)
downloadfpGUI-839de6506d1f7002db3ea045f7a562b1d45d685b.tar.xz
confirming XSetSelectionOwner succeeded as per ICCCM specs
Diffstat (limited to 'src')
-rw-r--r--src/corelib/x11/fpg_x11.pas8
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;