A Wayland kiosk
Find a file
Jente Hidskes 443d955dfd view: test whether XWayland surfaces have been mapped
This is to work around "misbehaving" (for lack of a better term)
clients. At the moment, Firefox Nightly and Google Chrome/Chromium are
known to be suchs client:

When XWayland support is enabled, Firefox first creates an XWayland
surface, closes this (before mapping it) and then opens an XDG toplevel
surface. Cage tries to manage the first XWayland surface, but when it
closes, Cage has no surfaces left and hence closes as well.

Hence, Cage terminates before it picks up on Firefox's XDG toplevel, and
Firefox (rightly) prints it cannot read the Wayland pipe.

In Chromium's case, it simply opens an XWayland surface which it
immediately closes, before opening the "real" XWayland surface.

The workaround is to track whether an XWayland surface has been mapped
and, if it hasn't, to not exit when we have no views left.

Firefox's behavior and the workaround are discussed in #18.

This commit fixes #18 and is part of the fix for #19.
2019-01-19 19:43:24 +01:00
cage.c Cage: destroy XWayland before clients 2019-01-18 13:29:30 +01:00
config.h.in Add missing config.h.in 2019-01-02 22:28:56 +01:00
idle_inhibit_v1.c Add idle inhibitor support 2019-01-09 20:05:09 +01:00
idle_inhibit_v1.h Add idle inhibitor support 2019-01-09 20:05:09 +01:00
LICENSE Update copyright to include 2019 2019-01-02 21:01:01 +01:00
meson.build meson: check WLR_HAS_XWAYLAND when building with XWayland 2019-01-19 19:21:13 +01:00
meson_options.txt Add XWayland support 2019-01-02 20:58:48 +01:00
output.c Output: render software cursors 2019-01-17 11:04:14 +01:00
output.h output: handle size changes 2019-01-10 15:50:31 +01:00
README.md README: credit rootston as well 2019-01-18 10:19:54 +01:00
seat.c Fully support multiple primary clients 2019-01-12 19:27:24 +01:00
seat.h Fully support multiple primary clients 2019-01-12 19:27:24 +01:00
server.h Add idle inhibitor support 2019-01-09 20:05:09 +01:00
view.c view: test whether XWayland surfaces have been mapped 2019-01-19 19:43:24 +01:00
view.h view: add view_has_children to query if a view has children 2019-01-12 19:27:24 +01:00
xdg_shell.c xdg_shell/xwayland: do not check parent for other view types 2019-01-18 17:37:40 +01:00
xdg_shell.h Use correct CG_ namespace in headers 2019-01-04 20:23:01 +01:00
xwayland.c xdg_shell/xwayland: do not check parent for other view types 2019-01-18 17:37:40 +01:00
xwayland.h Use correct CG_ namespace in headers 2019-01-04 20:23:01 +01:00

Cage: a Wayland kiosk

This is Cage, a Wayland kiosk. A kiosk runs a single, maximized application.

This README is only relevant for development resources and instructions. For a description of Cage and installation instructions for end-users, please see its project page.

Building and running Cage

You can build Cage with the meson build system. It requires wayland, wlroots and xkbcommon to be installed. Simply execute the following steps to build Cage:

$ meson build
$ ninja -C build

Cage comes with compile-time support for XWayland. To enable this, first make sure that your version of wlroots is compiled with this option. Then, add -Dxwayland=true to the meson command above. Note that you'll need to have the XWayland binary installed on your system for this to work.

You can run Cage by running ./build/cage APPLICATION. If you run it from within an existing X11 or Wayland session, it will open in a virtual output as a window in your existing session. If you run it at a TTY, it'll run with the KMS+DRM backend. In debug mode (default build type with Meson), press Alt+Esc to quit. To build a release build, use meson build --buildtype=release.

Cage is based on the annotated source of TinyWL and rootston.

Bugs

For any bug, please create an issue on GitHub.

License

Please see LICENSE on GitHub.

Copyright © 2018-2019 Jente Hidskes hjdskes@gmail.com