On 01/12/2014 07:46 AM, Hern��n Morales Durand wrote:Thanks for the detailed reply!
xscope is difficult to set up. I wonder if you have started another X
server in the background and which xscope parameters you've used?
Xscope seemed reasonably easy to set up.
./xscope -i1
then set DISPLAY to :1 before launching Pharo.
I don't think there's another X server involved -- the Pharo window is displayed on the correct screen, with the correct initial contents, and events are being delivered to it (as evidenced by it responding to Alt-. through output to the terminal) and the mouse pointer is the proper Pharo shape. But no other visual indication that it knows I'm trying to interact with it.
OK, tried this. It is indeed easier.
So you may want to give a shoot to xtruss:
http://www.chiark.greenend.org.uk/~sgtatham/xtruss/
It is used like strace.
$ xtruss pharo Pharo.image
Yes, I'm seeing these.
When you move the mouse over the image window, you should get this type
of output:
--- MotionNotify(root=w#000000DC, event=w#03000002, child=None,
same-screen=True, root-x=573, root-y=320, event-x=14, event-y=266,
detail=Normal, state=0x0010, time=0x2D840279)
--- MotionNotify(root=w#000000DC, event=w#03000002, child=None,
same-screen=True, root-x=572, root-y=320, event-x=13, event-y=266,
detail=Normal, state=0x0010, time=0x2D8402F5)
--- MotionNotify(root=w#000000DC, event=w#03000002, child=None,
same-screen=True, root-x=571, root-y=320, event-x=12, event-y=266,
detail=Normal, state=0x0010, time=0x2D8402F5)
Here's the sequence I get, after all the initial setup. Moving the mouse into the Pharo window, click, release, and move the mouse out of the window. Note that I held the mouse button down for a bit -- it wasn't a quick click.
When you enter focus in the Pharo window's area:
--- EnterNotify(root=w#000000DC, event=w#03000001, child=w#03000002,
mode=Normal, same-screen=True, focus=False, root-x=1153, root-y=705,
event-x=582, event-y=614, detail=NonlinearVirtual, state=0x0010,
time=0x2D894A60)
When you make a click to bring the world menu, this is the event sequence:
--- FocusOut(event=w#05600001, mode=Normal, detail=Inferior)
--- FocusIn(event=w#05600002, mode=Normal, detail=Ancestor)
--- PropertyNotify(window=w#0000028E, atom=a#360, state=NewValue, time=0x07C13BCF)
--- PropertyNotify(window=w#0000028E, atom=a#360, state=NewValue, time=0x07C13BCF)
--- EnterNotify(root=w#0000028E, event=w#05600001, child=w#05600002, mode=Normal, same-screen=True, focus=False, root-x=1465, root-y=684, event-x=263, event-y=661, detail=NonlinearVirtual, state=0x0000, time=0x07C141F6)
--- MotionNotify(root=w#0000028E, event=w#05600002, child=None, same-screen=True, root-x=1465, root-y=684, event-x=263, event-y=661, detail=Normal, state=0x0000, time=0x07C141F6)
--- MotionNotify(root=w#0000028E, event=w#05600002, child=None, same-screen=True, root-x=1465, root-y=683, event-x=263, event-y=660, detail=Normal, state=0x0000, time=0x07C1422D)
--- MotionNotify(root=w#0000028E, event=w#05600002, child=None, same-screen=True, root-x=1465, root-y=682, event-x=263, event-y=659, detail=Normal, state=0x0000, time=0x07C14266)
--- MotionNotify(root=w#0000028E, event=w#05600002, child=None, same-screen=True, root-x=1465, root-y=683, event-x=263, event-y=660, detail=Normal, state=0x0000, time=0x07C1453E)
--- MotionNotify(root=w#0000028E, event=w#05600002, child=None, same-screen=True, root-x=1466, root-y=683, event-x=264, event-y=660, detail=Normal, state=0x0000, time=0x07C14865)
--- ButtonPress(root=w#0000028E, event=w#05600002, child=None, same-screen=True, root-x=1466, root-y=683, event-x=264, event-y=660, detail=1, state=0x0000, time=0x07C148CE)
--- ButtonRelease(root=w#0000028E, event=w#05600002, child=None, same-screen=True, root-x=1466, root-y=683, event-x=264, event-y=660, detail=1, state=0x0100, time=0x07C1514D)
--- MotionNotify(root=w#0000028E, event=w#05600002, child=None, same-screen=True, root-x=1466, root-y=684, event-x=264, event-y=661, detail=Normal, state=0x0000, time=0x07C153C5)
--- FocusOut(event=w#05600002, mode=Normal, detail=Nonlinear)
--- FocusOut(event=w#05600001, mode=Normal, detail=NonlinearVirtual)
in the frightening https://github.com/pharo-project/pharo-vm/blob/master/platforms/unix/vm-display-X11/sqUnixX11.c�������� /*if (!XInitImage(stImage))����������������fprintf(stderr, "XInitImage failed (but we don't care)\n");*/