aboutsummaryrefslogtreecommitdiff
path: root/examples
AgeCommit message (Collapse)Author
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.
2022-01-19scene_graph: remove unused outputs listAlexander Orzechowski
2022-01-19scene_graph: use wlr_scene_output_send_frame_doneAlexander Orzechowski
2022-01-13surface: deprecate wlr_surface.hKirill Primak
2021-12-07examples: remove unnecessary partial_dependency() callSimon Ser
The definition of the "drm" dep already calls it.
2021-12-07examples: remove unnecessary wlroots deps for clientsSimon Ser
These clients don't need wlroots.
2021-12-07examples/layer-shell: remove wlroots dependencySimon Ser
This is a client example, it shouldn't use a compositor library like wlroots.
2021-12-07build: move wayland-client dep to backend/wayland/Simon Ser
wayland-client isn't really used by wlroots core, so let's move the dep to where it's needed in the Wayland backend.
2021-11-18examples: init wlr_output with allocator and rendererSimon Zeni
2021-10-07examples/foreign-toplevel: fix toplevel not being freedfwsmit
2021-09-08examples/scene-graph: use wlr_scene_outputSimon Ser
This allows us to get damage tracking for free™.
2021-09-02examples/scene-graph: demonstrate scene_rect node typeDevin J. Pohly
Add RECT nodes to the scene-graph demo to illustrate how they are used. Here, we add a solid rectangle behind each surface as a quick-and-dirty border, handling surface.commit in order to size it appropriately.
2021-08-26examples/scene-graph: new exampleSimon Ser
2021-08-06examples/fullscreen-shell: remove unused render_data.view fieldSimon Ser
2021-07-06move wlr_box from /types to /utilSimon Zeni
2021-07-01Remove unused wlr_list.h includesSimon Ser
2021-06-22Revert "build: workaround for meson disabler object not working with if not"Simon Ser
This reverts commit 9796abccedef881e99d293a2658c4da9466acd88. This Meson issue has been fixed upstream for a while. We require 0.56.0 so we should never hit an unpatched Meson.
2021-05-22Flush events in virtual pointer exampleBrian McKenna
2021-04-20examples/rotation: remove unused includesSimon Zeni
2021-04-20examples: introduce quads exampleSimon Zeni
This examples uses `wlr_render_quad_with_matrix` to render coloured squares on the screen, and uses the rotation to make them spin on their middle.
2021-04-19Stop specifying xkb_rule_namesSimon Ser
If a NULL xkb_rule_names pointer is passed to xkb_keymap_new_from_names, libxkbcommon will default to reading the XKB_* env variables. So there's no need to do it ourselves. Also s/xkb_map_new_from_names/xkb_keymap_new_from_names/ since the latter is more consistent with the returned struct name. [1]: https://xkbcommon.org/doc/current/structxkb__rule__names.html
2021-04-19examples: remove dependency on GLES2 for compositor examplesSimon Ser
Most of the examples had a GLES2 dependency, but weren't using it. Convert multi-pointer to wlr_renderer instead of using directly glClear.
2021-04-19examples: use wlr_output_preferred_modeSimon Ser
2021-04-17render: make GLES2 renderer optionalayaka
Allow selecting whether the GLES2 renderer gets enabled. Co-authored-by: Simon Ser <contact@emersion.fr>
2021-04-16examples/rotation: error out on invalid optionSimon Ser
2021-03-22examples/dmabuf-capture: stop using av_init_packetSimon Ser
It's deprecated in ffmpeg >= 4.4. Closes: https://github.com/swaywm/wlroots/issues/2798
2021-02-23examples: add libdrm partial dependency for compositorsSimon Ser
Fixes: 675bc396583f ("Fix wl_shm_format passed to wlr_texture_from_pixels")
2021-02-23Fix wl_shm_format passed to wlr_texture_from_pixelsSimon Ser
Fixes: 27fba3df4347 ("render: use DRM formats in wlr_texture_from_pixels")
2021-02-14examples: remove wlroots dep from client examplesSimon Ser
There is one exception: layer-shell still uses wlr_log. Would need to convert to fprintf to drop the wlroots dep there. Fixes: 34e7f69d6942 ("examples: remove dependency on wlr_egl from clients")
2021-02-14examples: drop wlr/render/egl.h include from client examplesSimon Ser
We use egl_common.h instead. Fixes: 34e7f69d6942 ("examples: remove dependency on wlr_egl from clients")
2021-02-14examples: drop wlroots dep from egl_common.cSimon Ser
Just use fprintf instead of wlr_log.
2021-02-04examples/egl_common: make attribs constBrandon Dowdy
Make (config, context)_attribs const just to be on the safe side.
2021-01-30examples: remove "major" and "minor" from egl_common.cBrandon Dowdy
Remove "major" and "minor" from egl_common.c as they are not used by the examples that use egl_common.c.