A Wayland kiosk
Find a file
Jente Hidskes a34c726a1c
Add XWayland support
With Cage becoming more popular since its mention on Phoronix and
therefore getting more use-cases than just my own project, add XWayland
support. The refactoring of 2cf40f7 makes this much easier. Note that
this is a no-cost addition for those of us not using XWayland as it is a
compile-time option that needs to be explicitly enabled by adding
`-Dxwayland=true` to your meson command.
2019-01-02 20:58:48 +01:00
cage.c Add XWayland support 2019-01-02 20:58:48 +01:00
LICENSE Initial commit 2018-12-25 20:29:22 +01:00
meson.build Add XWayland support 2019-01-02 20:58:48 +01:00
meson_options.txt Add XWayland support 2019-01-02 20:58:48 +01:00
output.c Add XWayland support 2019-01-02 20:58:48 +01:00
output.h Refactor cage into separate source files 2018-12-31 00:12:33 +01:00
README.md Switch to Meson 2018-12-25 20:29:23 +01:00
seat.c Add XWayland support 2019-01-02 20:58:48 +01:00
seat.h Add XWayland support 2019-01-02 20:58:48 +01:00
server.h Add XWayland support 2019-01-02 20:58:48 +01:00
view.c view_get_geometry: only out width and height 2019-01-02 20:47:46 +01:00
view.h Add XWayland support 2019-01-02 20:58:48 +01:00
xdg_shell.c view_get_geometry: only out width and height 2019-01-02 20:47:46 +01:00
xdg_shell.h Refactor cage into separate source files 2018-12-31 00:12:33 +01:00
xwayland.c Add XWayland support 2019-01-02 20:58:48 +01:00
xwayland.h Add XWayland support 2019-01-02 20:58:48 +01:00

Cage: a Wayland kiosk

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

User input such as moving, resizing, minimizing and unmaximizing windows is ignored. Dialogs are supported, although they too cannot be resized nor moved. Instead, dialogs are simply centered on the screen. There is no configuration for Cage. When the application is closed, Cage closes as well.

Cage supports a single, static output. It does not support hotplugging nor rotation. Input-wise, Cage supports pointer input, keyboard input and (soon) touch input. Copy and paste works as well.

Cage does not support Xwayland, nor any protocols other than xdg-shell. That is, there is no support for panels, virtual keyboards, screen capture, primary selection, etc. Open a PR if you want to see support for some of these; they can likely be added without much work. Cage fulfills my needs in its current state.

Notable omissions from Cage, to be added in a future version:

  • Damage tracking, which tracks which parts of the screen are changing and minimizes redraws accordingly.
  • HiDPI support.

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

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.

Bugs

For any bug, please create an issue on GitHub.

License

Please see LICENSE on GitHub.

Copyright © 2018 Jente Hidskes hjdskes@gmail.com