I have the same problem with myWindow xid.

� bad argument �.

Yet I have used all the other methods which also use myWindow xid and display as arguments. I think the problem is from the other arguments passed by reference, not by value.
I have seen a new version of Alien from Sept 30, but I don�t know if it works in pharo.
Annick

Le 25 sept. 2014 � 18:56, Nicolai Hess <nicolaihess@web.de> a �crit :


Am 25.09.2014 17:25 schrieb "Annick Fron" <list@afceurope.com>:
>
> Hi,
>
> I Have tried the following code on Linux , but the call breaks. Is it because of the X11Window structure missing or else ?
>
> Annick
> ====
> testGetOurWindowLocation
>    "self new testGetOurWindowLocation"
>
>    | display ourWindow aParent anX anY aWidth aHeight aBorderWidth aDepth |
>    display := X11Display XOpenDisplay: nil.
>    ourWindow := display ourWindow.
>    (Alien lookup: 'XGetGeometry' inLibrary: 'X11')
>        primFFICallResult: nil
>        withArguments:
>            {display.
>            ourWindow.
>            (aParent := Alien new: 4).
>            (anX := Alien new: 4).
>            (anY := Alien new: 4).
>            (aWidth := Alien new: 4).
>            (aHeight := Alien new: 4).
>            (aBorderWidth := Alien new: 4).
>            (aDepth := Alien new: 4)}.
>    (anX unsignedLongAt: 1) inspect

withArguments ...
ourWindow xid
...
?