On 08/23/2012 01:41 PM, Scott Moreau wrote:

It sounds like you should read the xwayland build guide
http://wayland.freedesktop.org/xserver.html
There's no trick to it, you just install everything and start weston
with --xserver and DISPLAY should automatically be set in the
environment so you can start running X apps. Read the build guide and
use the default configure options, you don't need to do all this extra
stuff you do to break it before it has a chance to work.

Okay, it is so close now I feel I may succeed!

What I did was:

1. Compile xf86-video-wlshm, with an edit that was in the wayland-build script I have:

   git clone git://people.freedesktop.org/~iksaif/xf86-video-wlshm
   sed -i -e s/hosted.h/xwayland.h/ xf86-video-wlshm/src/wlshm.h
   ./autogen.sh --prefix=$WLD
   make
   make install

2. After much futzing, came up with an xorg.conf that does not produce an error and uses wlshm (I think, an example of the correct file would be very helpful, or a patch to wayland xserver to not need it):

Section "ServerLayout"
    Identifier     "Default Layout"
    Screen      0  "Default Screen" 0 0
EndSection

Section "Device"
    Identifier "Device0"
    Driver "wlshm"
EndSection

Section "Screen"
    Identifier     "Default Screen"
    Device         "Device0"
EndSection

3. There appears to be no way to get weston to tell the xserver to use an alternative config file. So instead I rand weston without --xserver and replicated it's launch line inside the weston-terminal:

    Xorg -config ./xorg.conf -wayland -rootless :2 &

(adding some rules to weston to locate an alternative xorg.conf might be a good idea, or a way to pass arbitrary switches to Xorg).

4. I can run X clients, and they seem to talk to the server:

    export DISPLAY=:2

5. However nothing appears on the screen. If I kill the client debug information prints to stdout from Xorg (not from the client, showing that there was successful communication):

    (abbreviated because weston-terminal does not do copy & paste to X):
    1 XSELINUXs still allocated at reset
    SCREEN: 0 objects of 112 bytes = 0 total bytes 0 private allocs
    ... other 0 objects
    PIXMAP: 1 objects of 12 bytes = 12 total bytes 0 private allocs
    ....
    TOTAL: 1 objects, 12 bytes, 0 allocs
    1 PIXMAPs still allocated at reset
    ....
    xwl_input_delayed_init

6. Running xev produces some output on the stdout of xev showing some events have been passed:

Outer window is 0x200001, inner window is 0x200002

PropertyNotify event, serial 8, synthetic NO, window 0x200001,
    atom 0x27 (WM_NAME), time 260665416, state PropertyNewValue

PropertyNotify event, serial 9, synthetic NO, window 0x200001,
    atom 0x22 (WM_COMMAND), time 260665416, state PropertyNewValue

PropertyNotify event, serial 10, synthetic NO, window 0x200001,
    atom 0x28 (WM_NORMAL_HINTS), time 260665416, state PropertyNewValue

CreateNotify event, serial 11, synthetic NO, window 0x200001,
    parent 0x200001, window 0x200002, (10,10), width 50, height 50
border_width 4, override NO

PropertyNotify event, serial 14, synthetic NO, window 0x200001,
    atom 0xf1 (WM_PROTOCOLS), time 260665416, state PropertyNewValue

MapNotify event, serial 15, synthetic NO, window 0x200001,
    event 0x200001, window 0x200002, override NO

MapNotify event, serial 16, synthetic NO, window 0x200001,
    event 0x200001, window 0x200001, override NO

VisibilityNotify event, serial 16, synthetic NO, window 0x200001,
    state VisibilityUnobscured

Expose event, serial 16, synthetic NO, window 0x200001,
    (0,0), width 178, height 10, count 3

Expose event, serial 16, synthetic NO, window 0x200001,
    (0,10), width 10, height 58, count 2

Expose event, serial 16, synthetic NO, window 0x200001,
    (68,10), width 110, height 58, count 1

Expose event, serial 16, synthetic NO, window 0x200001,
    (0,68), width 178, height 110, count 0
(at this point all output stops, even if I try to click and hit keys in weston, and the program waits until I kill it)

Any ideas?

_______________________________________________
wayland-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/wayland-devel

Reply via email to