aboutsummaryrefslogtreecommitdiff
path: root/examples
AgeCommit message (Collapse)Author
2023-11-23util/transform: move over wl_output_transform helpersSimon Ser
These aren't really tied to wlr_output.
2023-10-25examples: drop dead client codeSimon Ser
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")
2023-10-12examples: split clients in separate repositorySimon Ser
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.
2023-10-12build: rename libdrm partial dep to be more explicitSimon Ser
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).
2023-10-04drop KDE idle protocol supportSimon Zeni
2023-10-03treewide: Migrate from sizeof(struct) to sizeof(*pointer) where practicalAlexander Orzechowski
2023-08-16examples/embedded: new exampleSimon Ser
2023-07-12add minimalist cairo exampleBrett Ernst
2023-07-10scene_output: optionally record and report timingsRose Hudson
2023-06-30examples/pointer: use wlr_cursor_set_xcursor()Simon Ser
2023-06-27examples: enable new outputsSimon Ser
2023-06-26examples/tablet: Don't use new render API and old render API togetherAlexander Orzechowski
We're using both APIs at the same time.
2023-06-23output: add wlr_output_state_init()Simon Ser
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.
2023-06-14examples: drop unnecessary include_directoriesSimon Ser
wlr_inc is already pulled in via the wlroots dep. proto_inc is already pulled in because extra_src contains these headers.
2023-06-13output: add wlr_output_state_set_layers()Simon Ser
2023-06-13examples: Drop usage of wlr_output.pendingAlexander Orzechowski
2023-06-12examples/output-layers: fix layers not included in commitSimon Ser
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")
2023-06-05examples/multi-pointer: dropSimon Ser
We already have another very similar example which demonstrates wlr_cursor: "pointer".
2023-06-05add render timer APIRose Hudson
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.
2023-06-05examples: Drop quadsAlexander Orzechowski
This example is incomparable with the new rendering API. The old one which we will drop one day.
2023-05-30examples: convert to new rendering APISimon Ser
Left out multi-pointer (will be removed) and quads (requires arbitrary rotation).
2023-04-14compositor: pass version in wlr_compositor_createSimon Ser
This allows wlroots to support newer versions of the interface without breaking the API.
2023-04-04output-layer: add support for scaling buffersSimon Ser
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).
2023-03-24examples/touch: support touch cancel eventsRose Hudson
2023-03-17examples/touch: fix incorrect event typeRose Hudson
2023-02-28examples/dmabuf-capture: fix frame_number deprecated in FFmpeg 6.0Simon Ser
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)); | ^~~
2023-02-20examples/output-layers: relay feedback eventsSimon Ser
2023-02-20examples/output-layers: new exampleSimon Ser
2023-02-01examples: use NULL theme name instead of "default"Simon Ser
This leaves it up to wlr_xcursor_theme_load() to pick the theme name.
2023-02-01examples, tinywl: use "default" cursor instead of "left_ptr"Simon Ser
"left_ptr" is the X11 name, "default" is the cursor spec name.
2022-11-15backend: return wlr_session in wlr_backend_autocreate() callSimon Ser
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.
2022-06-21wlr_input_device: remove anon union fieldIsaac Freund
This union is unnecessary since the recent input device refactor and can now be replaced by wlr_*_from_input_device() functions.
2022-06-04examples/screencopy-dmabuf: stop using strncpySimon Ser
strncpy doesn't guarantee that the result is zero-terminated.
2022-06-04examples/text-input: stop using strcpy/strcatSimon Ser
These functions are too easy to misuse, they don't do bounds checking.
2022-05-31wlr_scene: Only allow parenting on a wlr_scene_treeAlexander Orzechowski
2022-05-31wlr_scene: Refactor wlr_scene (the root element) to encase a wlr_scene_treeAlexander Orzechowski
Co-authored-by: Isaac Freund <mail@isaacfreund.com>
2022-05-30build: make GBM optionalSimon Ser
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.
2022-05-19wlr_scene: Refactor wlr_scene_surface to be a helper on top of wlr_scene_bufferAlexander Orzechowski
2022-05-15xdg-shell: specify version in wlr_xdg_shell_createSimon Ser
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
2022-05-09examples/layer-shell: premultiply alphaKirill Primak
2022-05-09examples/egl_common: switch rgba formatJohannes
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!
2022-03-17types/wlr_touch: uniformize events nameSimon Zeni
2022-03-17types/wlr_tablet_tool: uniformize events nameSimon Zeni
2022-03-17types/wlr_tablet_pad: uniformize events nameSimon Zeni
2022-03-17types/wlr_keyboard: uniformize events nameSimon Zeni
2022-03-17types/wlr_pointer: uniformize events nameSimon Zeni
2022-03-17types/wlr_input_device: move width_mm and height_mm fields to wlr_tablet and ↵Simon Zeni
wlr_touch
2022-03-02examples/input-method: Don't crash on NULL surrounding textGuido Günther
E.g. With e.g. gnome-terminal we never end up in handle_surrouding so it will be NULL.
2022-02-21Fixed compiling with FFmpeg 5.0Keith Bowes
2022-01-19scene_graph: Simplify computation for offset of new surfaces.Alexander Orzechowski
This became possible after the usage of wlr_surface_send_frame_done.