michaelforney / swc

a library for making a simple Wayland compositor
MIT License
616 stars 52 forks source link

Black screen & no weston-terminal #10

Closed jcelerier closed 10 years ago

jcelerier commented 10 years ago

Hello,

When I run swc-launch -- ./wm I get a black screen with a mouse cursor which does not move.

If I try to run a weston-terminal instance I get :

# weston-terminal
wl_drm@12: error 0: drmAuthMagic failed: -13

failed to initialize EGL
EGL does not seem to work, falling back to software rendering and wl_shm.
weston-terminal: clients/window.c :4389 : window_create_internal:  assertion « custom || display->xdg_shell » failed.

The swc-launch logs tells multipe time "Dropping DRM master", I don't know if it is relevant...

Thanks

michaelforney commented 10 years ago

It looks like this is because weston-terminal now uses xdg_shell rather than wl_shell, which is not yet supported (I have a WIP in my tree). xdg_shell support is tricky because the interface is not yet finalized. I will take another look now that it contains the ack_configure method required to support tiling window managers correctly.

As for the mouse cursor not moving... I'm not sure. Are you using a touchpad? If so, this is because EV_ABS devices are also not yet supported (just EV_REL, usually mouses).

jcelerier commented 10 years ago

Okay!

And yes, I am using a touchpad. I am looking at handle_abs_event right now, however I don't know how to differenciate between a touchpad and a touchscreen ? Both are absolute devices but the touchpad maps to relative controls, doesn't it ?

Also, do you know about Wayland's libinput ? If I understood correctly, it would more-or-less allow to abstract the whole "low-level input event handling" part.


Jean-Michaël Celerier Élève-ingénieur spécialisé en informatique ENSEIRB-MATMECA, Université Bordeaux 1 http://www.jcelerier.name

On Sat, Jul 12, 2014 at 3:55 AM, Michael Forney notifications@github.com wrote:

It looks like this is because weston-terminal now uses xdg_shell rather than wl_shell, which is not yet supported (I have a WIP in my tree). xdg_shell support is tricky because the interface is not yet finalized. I will take another look now that it contains the ack_configure method required to support tiling window managers correctly.

As for the mouse cursor not moving... I'm not sure. Are you using a touchpad? If so, this is because EV_ABS devices are also not yet supported (just EV_REL, usually mouses).

— Reply to this email directly or view it on GitHub https://github.com/michaelforney/swc/issues/10#issuecomment-48799375.

michaelforney commented 10 years ago

Yes, I am aware of libinput. It seems like an interesting project, but using it would introduce a hard dependency on libudev.

For differentiating between a touchpad and a touchscreen, it looks like libinput uses a heuristic to detect what type of device it is: http://cgit.freedesktop.org/wayland/libinput/tree/src/evdev.c#n697. The complicated bit is implementing the touchpad support. You can look at http://cgit.freedesktop.org/wayland/libinput/tree/src/evdev-mt-touchpad.c, but it seems pretty hard to get right.

I'm thinking that instead of option udev hotplugging support like we have now, I will look into optional libinput support (which would use udev underneath).

Closing as duplicate of #2 and #5.