aboutsummaryrefslogtreecommitdiff
path: root/examples/simple.c
AgeCommit message (Collapse)Author
2023-10-03treewide: Migrate from sizeof(struct) to sizeof(*pointer) where practicalAlexander Orzechowski
2023-06-27examples: enable new outputsSimon Ser
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-13examples: Drop usage of wlr_output.pendingAlexander Orzechowski
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-05-30examples: convert to new rendering APISimon Ser
Left out multi-pointer (will be removed) and quads (requires arbitrary rotation).
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-03-17types/wlr_keyboard: uniformize events nameSimon Zeni
2021-11-18examples: init wlr_output with allocator and rendererSimon Zeni
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: use wlr_output_preferred_modeSimon Ser
2020-12-30Remove wlr_create_renderer_func_tSimon Ser
This callback allowed compositors to customize the EGL config used by the renderer. However with renderer v6 EGL configs aren't used anymore. Instead, buffers are allocated via GBM and GL FBOs are rendered to. So customizing the EGL config is a no-op.
2020-11-11Remove unneeded includes from wlr_input_device.hIsaac Freund
This uncovered many places where we were using things without directly including them.
2020-08-14examples/simple: use wlr_renderer instead of GLSimon Ser
2020-08-14examples/simple: use wlr_output_preferred_modeSimon Ser
2020-02-08examples: Fix compositor-examplesScott Anderson
Due to the way the wlr_output API was changed, these examples would never get a frame event to start the rendering loop. We now commit the outputs to start it.
2019-11-20Add -Wmissing-prototypesSimon Ser
This requires functions without a prototype definition to be static. This allows to detect dead code, export less symbols and put shared functions in headers.
2019-07-27Remove all wayland-server.h includesSimon Ser
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. Replacing wayland-server.h with wayland-server-core.h allows us to drop the WL_HIDE_DEPRECATED declaration.
2019-04-23output: refactor frame submission APISimon Ser
This is necessary for direct scan-out and other upcoming features. This patch changes the output API to look like the wl_surface API. Outputs now have some double-buffered state: the frame to be submitted (currently only wlr_renderer frames are supported) and the damaged region. To attach a pending frame, use wlr_output_attach_render. To set the pending damaged region, use wlr_output_set_damage. To submit the pending state, call wlr_output_commit. This will submit the pending frame to the backend. To migrate from the old API to the new one: - Replace wlr_output_make_current calls by wlr_output_attach_render - Replace wlr_output_swap_buffers calls by wlr_output_set_damage and wlr_output_commit
2018-09-03Handle setting keymap in examples more securelyrandom human
2018-07-29examples: cleanup simpleemersion
- Move a log to where it should be - Enforce code style - Rename wlr to backend
2018-07-09util: add wlr_ prefix to log symbolsemersion
2018-05-30cleanup: Use void for zero-parameter functionsGenki Sky
Signed-off-by: Genki Sky <sky@genki.is>
2018-05-25backends: implement custom EGL and renderer initializationIlia Bozhinov
Compositors now have more control over how the backend creates its renderer. Currently all backends create an EGL/GLES2 renderer, so the necessary attributes for creating the context are passed to a user-provided callback function. It is responsible for initializing provided wlr_egl and to return a renderer. On fail, return 0. Fixes #987
2018-05-10Fixed emersion's issuesTimidger
2018-05-10Fixed style issuesTimidger
2018-05-10Remvoed unnecessary wayland socket in examplesTimidger
2018-05-10Made touch standaloneTimidger
TODO test
2018-05-10simple now works on DRMTimidger
2018-05-10Can now quit the simple exampleTimidger
2018-05-10Got simple working without keyboard inputTimidger
2018-03-19render: split render.h into wlr_renderer.h and wlr_texture.hemersion
2018-01-21output: add damage tracking via buffer ageemersion
2018-01-19output: fix software cursors damage trackingemersion
2018-01-15Fixed logging for examplesTimidger
2017-11-01Move shared example codeDrew DeVault
2017-09-24Move keyboard logic to wlr_{keyboard,seat}Drew DeVault
2017-08-19examples: separate compositor_fini from runDominique Martinet
compositor_fini destroys the display, but it is an error to destroy it before e.g. wlr_seat that references it. This lets us order destroy calls properly, following first-in-last-out logic.
2017-08-06Changed header paths.Scott Anderson
2017-06-29Merge branch 'wlcore'Drew DeVault
2017-06-28Move example -> examplesDrew DeVault
And the compositor example into its own directory