- Update wlr_box includes to util/box.h: the wlroots header has
been moved upstream.
- Subsurface fields have been moved
- Create renderer and allocator, stop using wlr_backend_get_renderer
- Initalize output rendering
cage.c:307:61: error: too many arguments to function call, expected single argument 'display', have 2 arguments
server.backend = wlr_backend_autocreate(server.wl_display, NULL);
~~~~~~~~~~~~~~~~~~~~~~ ^~~~
/usr/include/sys/_null.h:34:14: note: expanded from macro 'NULL'
#define NULL ((void *)0)
^~~~~~~~~~~
/usr/local/include/wlr/backend.h:36:21: note: 'wlr_backend_autocreate' declared here
struct wlr_backend *wlr_backend_autocreate(struct wl_display *display);
^
Based on 53f5197c26
This enum provides two means of behaviour for multi-output setups:
extend the display across all outputs, or only use the last one. The
former is the current (and default) behaviour; the latter will be added
in the next commit.
If something goes wrong during startup (i.e., the wlroots backend cannot
be created), we jump to the end. This then unconditionally removes the
sigchld_source, but that hasn't been set at this point yet.
With the new CLOEXEC setting, spawning the primary client
can fail *after* forking. In this case, the client process
has been forked and will need to be cleaned up.
In case something fails before pid has been set, it's set to 0.
From waitpid(2):
The value of pid can be:
0 meaning wait for any child process whose process group ID
is equal to that of the calling process at the time of the
call to waitpid().
That will be none in this case, and hence this won't block and is thus
safe.
As mentioned by @emersion:
By default, pipe creates FDs without the CLOEXEC flag set, which means
they will be leaked to any other child process spawned. Would be nice to
set the CLOEXEC flag to prevent the leak.
wl_display will destroy the outputs, whose destroy handler will remove
them from the output layout. But by that point, the output layout has
already been destroyed.
According to the Wayland docs:
If the event source is registered for re-check with
wl_event_source_check(): 0 for all done, 1 for needing a re-check. If
not registered, the return value is ignored and should be zero.
See e.g. http://manpages.ubuntu.com/manpages/cosmic/man3/wl_event_source.3.html
Since we don't register any of these for re-checking, we should
return 0.
With Cage now supporting hotplugging of outputs, we shouldn't warp the
cursor to the center of every new output. Rather, we should warp it only
on the initial startup.
Outputs are arranged in a horizontal layout in the order they are
created in by wlroots. Maximized xdg_shell views will span all outputs,
like the global fullscreen mode in sway.
Fixes#87
The documentation for `wayland-server.h` says:
> Use of this header file is discouraged. Prefer including
> wayland-server-core.h instead, which does not include the server protocol
> header and as such only defines the library PI, excluding the deprecated API
> below.
See also
ca45f4490c (diff-b57e10fe0774258a6d21b22077001cff)
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