In this mode, only the last connected output will be used. If that one
is unplugged, the previously last connected output will be enabled. This
for example allows one to switch between two outputs, e.g. on a handheld
device such as a mobile phone.
These will allow different patterns of multimonitor behaviour. In a
followup commit, we will introduce a behaviour where only the last
connected output is in use.
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.
The function also did an intersection check, so it did more than just
getting the surface box. This refactoring makes it more clear.
This commit also fixes a bug in coordinate spaces that makes dialogs
render properly over multiple outputs.
This is based on code from Sway, which is also MIT licensed hence
compatible. This makes the surface damaging and rendering code easier to
follow and makes it easier to import future changes to Sway as well.
Following breaking changes in wlroots 0.9.0, wlr_output_commit must be
called after wlr_output_set_mode, wlr_output_set_transform and wlr_output_enable.
Additionally, wlr_output_enable is no longer implicitly called by
wlr_output_set_mode.
Fixes#102
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)
On outputs that have modes, we need to set one before we can use it. We
pick the preferred mode, or if this is not advertised, the last listed
mode. This mode is generally the mode with the highest resolution.
Fixes#10
This is the path we settled on in #24.
That is: any new toplevel window takes over the Cage display, hiding any
previous toplevels until it is closed. Only when the last toplevel is
closed, does Cage exit as well.