GTK still uses the (now deprecated) server-decoration protocol, which is
the predecessor to xdg-decoration. Hence, with this commit Cage now also
hides decorations on applications such as Firefox.
Fixes#47, see also
https://github.com/Hjdskes/cage/pull/45#issuecomment-466402865.
This commit adds a commandline switch (-d) to disable client side
decorations, if possible. In this case, Cage will not draw any
decorations of its own, in order to maximize screen real estate.
The default behavior remains the same, i.e., if -d is not passed,
clients will draw their client side decorations, if any.
Fixes#32
Cage uses wl_event_loop_add_signal to handle SIGINT and SIGTERM, which
masks these signals. This means that the subprocess spawned by Cage
start with these signals masked, which can lead to delays in Cage
shutting down on e.g. ^C. Hence, we now unmask all signals between fork
and exec.
Fixes#40
When using the Wayland or X11 backend, Cage is drawn inside a window.
This commit sets this window's title to that of the currently focused
toplevel window inside Cage.
Fixes#29.
With this, some apps (e.g. mpv) can block the idle tracker from
kicking in. This way, the screen won't blank (or whatever you
configured) when the application doesn't want it to.
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.
This makes Cage much easier to maintain. Not only is it easier where to
look and to maintain a mental model of the code, there is also more
encapsulation, better abstractions and better extendability.
Since we do not ever minimize or otherwise unmap clients (except when
destroying them), we don't need to track mapped/unmapped state. The
destroy case is captured in checking whether the surface has a buffer
attached to it, before requesting its texture.
This makes it easier to extend in the future. Also, it will make it
easier to add (un)install targets and eventually, distribute files such
as systemd services.
It appears that wlr_xdg_toplevel_set_maximized does not actually change
the size of the surface. Rather, it only makes the surface think it is
maximized. Hence, we need to set the size to that of the output
manually.