Commit graph

32 commits

Author SHA1 Message Date
Simon Ser
fbc2182b9f Stop specifying xkb_rule_names
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-19 17:33:28 +02:00
Simon Ser
fd7e565ce3 examples: use wlr_output_preferred_mode 2021-04-19 17:25:41 +02:00
Simon Ser
4b03bdc3ab Remove wlr_create_renderer_func_t
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-12-30 17:09:40 +01:00
Isaac Freund
e06c9e43af Remove unneeded includes from wlr_input_device.h
This uncovered many places where we were using things without directly
including them.
2020-11-11 15:40:47 +01:00
Simon Ser
379835c42f examples/simple: use wlr_renderer instead of GL 2020-08-14 09:57:31 -06:00
Simon Ser
801c7670b7 examples/simple: use wlr_output_preferred_mode 2020-08-14 09:57:31 -06:00
Scott Anderson
2fea2fced8 examples: Fix compositor-examples
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.
2020-02-08 11:38:44 +01:00
Simon Ser
16e5e9541b Add -Wmissing-prototypes
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-11-20 02:05:03 +00:00
Simon Ser
ca45f4490c Remove all wayland-server.h includes
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-07-27 15:49:32 -04:00
Simon Ser
23e37e7b1d output: refactor frame submission API
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
2019-04-23 14:34:30 -06:00
random human
7105864e13
Handle setting keymap in examples more securely 2018-09-03 02:43:44 +05:30
emersion
d4181c5a7a examples: cleanup simple
- Move a log to where it should be
- Enforce code style
- Rename wlr to backend
2018-07-29 15:32:25 +01:00
emersion
7cbef15206
util: add wlr_ prefix to log symbols 2018-07-09 22:49:54 +01:00
Genki Sky
d1cf9acbd5 cleanup: Use void for zero-parameter functions
Signed-off-by: Genki Sky <sky@genki.is>
2018-05-30 20:19:16 -04:00
Ilia Bozhinov
24cf70ae96 backends: implement custom EGL and renderer initialization
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-25 14:56:52 +03:00
Timidger
9a1d0e42d2
Fixed emersion's issues 2018-05-10 19:03:58 -07:00
Timidger
7da50d065b
Fixed style issues 2018-05-10 19:03:58 -07:00
Timidger
7f1230fe78
Remvoed unnecessary wayland socket in examples 2018-05-10 19:03:57 -07:00
Timidger
c622a0c7fb
Made touch standalone
TODO test
2018-05-10 19:03:56 -07:00
Timidger
7284709370
simple now works on DRM 2018-05-10 19:03:56 -07:00
Timidger
44b2bf18f0
Can now quit the simple example 2018-05-10 19:03:56 -07:00
Timidger
b98779a674
Got simple working without keyboard input 2018-05-10 19:03:56 -07:00
emersion
c41de2d1be
render: split render.h into wlr_renderer.h and wlr_texture.h 2018-03-19 23:16:29 +01:00
emersion
0365b587f0
output: add damage tracking via buffer age 2018-01-21 00:06:35 +01:00
emersion
e29a0df8c1
output: fix software cursors damage tracking 2018-01-19 14:08:47 +01:00
Timidger
264ef0c261
Fixed logging for examples 2018-01-15 22:51:00 -05:00
Drew DeVault
4f73498b78 Move shared example code 2017-11-01 15:47:58 -04:00
Drew DeVault
61e451ea1b Move keyboard logic to wlr_{keyboard,seat} 2017-09-24 14:12:56 -04:00
Dominique Martinet
5885679e33 examples: separate compositor_fini from run
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-19 09:31:06 +02:00
Scott Anderson
cb4d50e22c Changed header paths. 2017-08-06 13:25:26 +12:00
Drew DeVault
8920b5d607 Merge branch 'wlcore' 2017-06-29 16:00:24 -04:00
Drew DeVault
28736c5787 Move example -> examples
And the compositor example into its own directory
2017-06-28 18:23:49 -04:00
Renamed from example/simple.c (Browse further)