Age | Commit message (Collapse) | Author |
|
WLR_INPUT_DEVICE_TABLET_TOOL is renamed to WLR_INPUT_DEVICE_TABLET
The input device corresponds to wlr_tablet, not wlr_tablet_tool.
|
|
|
|
Stop trying to maintain a per-file _POSIX_C_SOURCE. Instead,
require POSIX.1-2008 globally. A lot of core source files depend
on that already.
Some care must be taken on a few select files where we need a bit
more than POSIX. Some files need XSI extensions (_XOPEN_SOURCE) and
some files need BSD extensions (_DEFAULT_SOURCE). In both cases,
these feature test macros imply _POSIX_C_SOURCE. Make sure to not
define both these macros and _POSIX_C_SOURCE explicitly to avoid
POSIX requirement conflicts (e.g. _POSIX_C_SOURCE says POSIX.1-2001
but _XOPEN_SOURCE says POSIX.1-2008).
Additionally, there is one special case in render/vulkan/vulkan.c.
That file needs major()/minor(), and these are system-specific.
On FreeBSD, _POSIX_C_SOURCE hides system-specific symbols so we need
to make sure it's not defined for this file. On Linux, we can
explicitly include <sys/sysmacros.h> and ensure that apart from
symbols defined there the file only uses POSIX toys.
|
|
|
|
|
|
Many files used to require wlr_matrix but no longer do.
|
|
Currently wlr_output holds a wl_display, but it will go away soon.
Instead of relying on that field in wlr_output_create_global(),
make the dependency explicit by taking a wl_display as argument.
|
|
The output layout creates and destroys wl_output globals. We will
soon need the wl_display to do so.
|
|
These aren't really tied to wlr_output.
|
|
Client examples have been moved to another repo, but it seems I
forgot to delete some files.
Fixes: 0bb445eeffc5 ("examples: split clients in separate repository")
|
|
The client examples are useful to try out protocols, however they
don't need to live in the wlroots repository. Having both clients
and compositors in the same place is confusing. The wlroots API
changes often but protocols are set in stone.
|
|
The variable is named "libdrm" but it's a partial dependency with
just the headers. Reflect this in the name to avoid confusion (Meson
variables are global to the whole project).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
We're using both APIs at the same time.
|
|
This changes the semantics of wlr_output_state. Instead of having
fields with uninitialized memory when missing from the committed
bitflag, all fields are always initialized (and maybe NULL/empty),
just like we do in wlr_surface_state. This reduces the chances of
footguns when reading a field, and removes the need to check for
the committed bitfield everywhere.
A new wlr_output_state_init() function takes care of initializing
the Pixman region.
|
|
wlr_inc is already pulled in via the wlroots dep. proto_inc is
already pulled in because extra_src contains these headers.
|
|
|
|
|
|
wlr_output_set_layers() attaches layers to the output's pending
state, but then uses a detached wlr_output_state in
wlr_output_state_commit(). This results in layers being left out
of the committed state.
Fixes: 8e81b4bb4237 ("examples: convert to new rendering API")
|
|
We already have another very similar example which demonstrates
wlr_cursor: "pointer".
|
|
Based on five calls:
wlr_render_timer_create - creates a timer which can be reused across
frames on the same renderer
wlr_renderer_begin_buffer_pass - now takes a timer so that backends can
record when the rendering starts and finishes
wlr_render_timer_get_time - should be called as late as possible so that
queries can make their way back from the GPU
wlr_render_timer_destroy - self-explanatory
The timer is exposed as an opaque `struct wlr_render_timer` so that
backends can store whatever they want in there.
|
|
This example is incomparable with the new rendering API. The old one which
we will drop one day.
|
|
Left out multi-pointer (will be removed) and quads (requires
arbitrary rotation).
|
|
This allows wlroots to support newer versions of the interface
without breaking the API.
|
|
This allows callers to set a destination size different from the
buffer size to scale them.
The DRM backend supports this. The Wayland backend doesn't yet
(we'd need to wire up viewporter).
|
|
|
|
|
|
Fixes the following error:
../examples/dmabuf-capture.c:524:33: error: 'frame_number' is deprecated [-Werror=deprecated-declarations]
524 | ctx->avctx->frame_number, get_fifo_size(&ctx->vid_frames));
| ^~~
|
|
|
|
|
|
This leaves it up to wlr_xcursor_theme_load() to pick the theme
name.
|
|
"left_ptr" is the X11 name, "default" is the cursor spec name.
|
|
Up until now, wlr_backend_autocreate() created the wlr_session and
then stuffed it into struct wlr_multi_backend so that compositors
can grab it later.
This is an abuse of wlr_multi_backend and the wlr_backend API:
wlr_backend_get_session() and wlr_multi_backend.session only exist
to accomodate the needs of wlr_backend_autocreate(). What's more,
the DRM and libinput backends don't implement
wlr_backend_impl.get_session.
Instead, return the struct wlr_session to the compositor in the
wlr_backend_autocreate() call. wlr_backend_get_session() will be
removed in the next commit.
|
|
This union is unnecessary since the recent input device refactor and can
now be replaced by wlr_*_from_input_device() functions.
|
|
strncpy doesn't guarantee that the result is zero-terminated.
|
|
These functions are too easy to misuse, they don't do bounds
checking.
|
|
|
|
Co-authored-by: Isaac Freund <mail@isaacfreund.com>
|
|
Now that the DRM backend no longer depends on GBM, we can make it
optional. The GLES2 renderer still depends on it because of our EGL
device selection.
This is useful for compositors with their own renderers, and for
compositors using the Vulkan renderer.
|
|
|
|
With protocol additions such as [1], compositors currently have no
way to opt out of the version upgrade. The protocol upgrade will
always be backwards-compatible but may require new compositor
features.
The status quo doesn't make it possible to ship a protocol addition
without breaking the wlroots API. This will be an issue for API
stabilization [2].
To address this, let compositors provide a maximum version in the
function creating the global. We need to support all previous versions
of the interface anyways because of older clients.
This mechanism works the same way as Wayland clients passing a version
in wl_global.bind.
[1]: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/3514
[2]: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/1008
References: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3397
|
|
|
|
The current ARGB2101010 has really "corase" control over the alpha.
Particularily, examples/layer-shell would look really strange with certain
parameters. For examples, when passing an alpha of 0.84, the box would not
appear transparent at all anymore.
Patched as suggested by @mstoeckl -- thank you!
|
|
|