[fpc-pascal] Anybody know X11 and XDND (drag-n-drop)
Graeme Geldenhuys
graemeg.lists at gmail.com
Fri Sep 10 10:08:21 CEST 2010
Hi,
I'm having trouble fetching the XdndTypeList data. It works 100% on my
32-bit Linux laptop, but now trying on my 64-bit Linux desktop at
work, the XGetWindowProperty() call under 64-bit linux for the
XdndTypeList always returns count = 0, when in fact it should be 8, as
my last section of the output shows. I simply forced count = 8,
because I knew Nautilus has that many types, and wanted to see if my
array of TAtom's actually contains the data - which it does! So it
does seem to fetch the data, it just doesn't report it in the
variables: actualformat, count, remaining.
Anybody got experience with this and know how I can resolve this problem?
type
AtomArray = array [0..0] of TAtom;
PAtomArray = ^AtomArray;
var
s: string;
actualtype: TAtom;
actualformat: Integer;
count, remaining, dummy: longword;
xdndtypes: PAtomArray;
begin
...
XGetWindowProperty(fpgApplication.Display, FSrcWinHandle,
XdndTypeList, 0, dummy,
TBool(False),
AnyPropertyType,
@actualtype, @actualformat, @count, @remaining,
@xdndtypes);
s := XGetAtomName(fpgApplication.Display, actualtype);
writeln(Format(' ActualType: %s (%d)', [s, ActualType]));
writeln(' Actualformat = ', ActualFormat);
writeln(' count = ', count);
writeln(' remaining = ', remaining);
------------ [ output of my test program ]--------------------
XdndEnter event received!
ver(4) check-XdndTypeList(True) data=1E0E816h,67108865,0,0,0
* We will be using XDND v4 protocol *
** We need to fetch XdndTypeList (>3 types)
Actual fetch: ---------------------
ActualType: ATOM (4)
Actualformat = 0
count = 0 <--- ????????????
remaining = 0
Force the count size to be eight: --------------------------
Format #1 = x-special/gnome-icon-list (564)
Format #2 = text/uri-list (531)
Format #3 = UTF8_STRING (283)
Format #4 = COMPOUND_TEXT (463)
Format #5 = TEXT (464)
Format #6 = STRING (31)
Format #7 = text/plain;charset=utf-8 (465)
Format #8 = text/plain (466)
--------------------------------
--
Regards,
- Graeme -
_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/
More information about the fpc-pascal
mailing list