aboutsummaryrefslogtreecommitdiff
path: root/include
AgeCommit message (Collapse)Author
2020-05-19xwayland: add option to disable WMSimon Ser
2020-05-19xwayland: split serverSimon Ser
Split the server part of wlr_xwayland into wlr_xwayland_server. This allows compositors to implement their own XWM when wlroots' isn't a good fit.
2020-05-19render/egl: introduce wlr_egl_unset_currentSimon Ser
This function can be called after wlr_egl_make_current to cleanup the EGL context. This avoids having lingering EGL contexts that make things work by chance. Closes: https://github.com/swaywm/wlroots/issues/2197
2020-05-18Make wlr_xcursor_manager_load() return a boolIsaac Freund
This is currently inconsistent with the rest of the library and a bit of a footgun for new compositors. However, this breaks the API in a very unfortunate way for existing compositors.
2020-05-14output: make wlr_output_set_gamma atomicSimon Ser
wlr_output_set_gamma is now double-buffered and applies the gamma LUT on the next output commit.
2020-05-14tablet: expose wlr_tablet_tool_v2_has_implicit_grab functionTudor Brindus
This is necessary so that sway can determine when to start emulating pointer events -- it shouldn't start doing so during an implicit grab, even if the pen is over a surface that doesn't bind tablet input. Refs swaywm/sway#5302.
2020-05-13input/pointer: notify compositor when constraint region changesTudor Brindus
This allows a compositor to know when warping back into the region is appropriate. Refs swaywm/sway#5268.
2020-05-11render/egl: include EGL/eglmesaext.h only if presentJulien Olivain
This patch will make the EGL renderer work on any EGL/GLESv2 driver providing the EGL_WL_bind_wayland_display extensions. Mesa used to declare provisional EGL_WL_bind_wayland_display directly in <EGL/eglext.h>. Then, all unofficial extensions were moved to <EGL/eglmesaext.h>, to have a cleaner implementation. See: https://gitlab.freedesktop.org/mesa/mesa/-/commit/ab7bb10a2af711086319ce35815acd797b86fe27 The extension was then approved at Khronos Group, and reached the official <EGL/eglext.h>. See: https://www.khronos.org/registry/EGL/extensions/WL/EGL_WL_bind_wayland_display.txt https://github.com/KhronosGroup/EGL-Registry/commit/aa9b63f3ab18aee92c95786a2478156430f809e4 In order to make sure the renderer will work on any version of any implementation providing the extension, only include the mesa-specific header if it's present. Signed-off-by: Julien Olivain <juju@cotds.org>
2020-05-10backend/drm: simplify atomic commit logicSimon Ser
We don't need a per-CRTC atomic request anymore. Let's make the request per-commit so that it's easier to debug. This is also groundwork for supporting wlr_output_test properly.
2020-05-10backend/drm: GAMMA_LUT_SIZE isn't atomicSimon Ser
GAMMA_LUT_SIZE isn't an atomic property. It can be used with the legacy interface too. So we can unify both codepaths and remove wlr_drm_interface.crtc_get_gamma_size. It's no guaranteed to exist though, so we still need to keep the fallback.
2020-05-09backend/drm: remove crtc_set_cursor from interfaceSimon Ser
2020-05-09backend/drm: remove conn_enable from interfaceSimon Ser
Use crtc_commit instead.
2020-05-09backend/drm: rename crtc_pageflip to crtc_commitSimon Ser
Also add a flags argument. The commit function will also be used for disabling the CRTC.
2020-05-09backend/drm: apply gamma LUT on page-flipSimon Ser
2020-05-09backend/drm: remove mode argument to crtc_pageflipSimon Ser
Add a new wlr_drm_crtc.pending bitfield which keeps track of pending output changes. More fields will be added in the future (e.g. active, gamma).
2020-05-09backend/drm: remove unused fieldsSimon Ser
2020-05-09backend/drm: remove wlr_drm_interface.crtc_move_cursorSimon Ser
Instead, make the legacy backend call drmModeMoveCursor on page-flip.
2020-05-07input/keyboard: expose keymap matching helperTudor Brindus
sway needs this logic too, and currently ships a version that has fallen behind in terms of bugfixes (b1a63bc).
2020-05-04wlr/types: use bitshifts for tablet axes enumTudor Brindus
2020-05-02backend/headless: handle renderer destroySimon Ser
When the headless backend uses an already-existing renderer, it doesn't have ownership over the renderer. When the renderer is destroyed, the headless backend needs to destroy itself.
2020-05-02Add wlr_surface_accepts_touchDavid96
2020-04-28render/texture: add width and height fieldsSimon Ser
Instead of requiring compositors to call wlr_texture_get_size each time they want to access the texture's size, expose this information as wlr_texture fields.
2020-04-28backend/drm: move atomic cursor code into pageflip codeScott Anderson
It makes sense to construct as much atomic state as possible in the same place, so it doesn't get lost if we "reset" it.
2020-04-28backend/drm: introduce wlr_drm_fbScott Anderson
This is a type which manages gbm_surfaces and imported dmabufs in the same place, and makes the lifetime management between the two shared. It should lead to easier to understand code, and fewer special cases. This also contains a fair bit of refactoring to start using this new type. Co-authored-by: Simon Ser <contact@emersion.fr>
2020-04-22backend/headless: add wlr_headless_backend_create_with_rendererSimon Ser
This allows one to create a headless backend with an existing renderer.
2020-04-22backend/headless: use FBOs instead of pbuffersSimon Ser
2020-04-22render/gles2: add wlr_gles2_renderer_check_extSimon Ser
2020-04-22output_layout: improve docsSimon Ser
2020-04-17Document the events of wlr_layer_surfaceIsaac Freund
2020-04-15seat: add selection event docsTudor Roman
2020-04-10output: fix blurred hw cursors with fractional scalingSimon Ser
The scaling factor was being implicitly cast to an int. Closes: https://github.com/swaywm/sway/issues/4927
2020-04-09render/egl: make config attribs constSimon Ser
wlr_egl_init is not allowed to mutate these attribs.
2020-04-08Add wlr_output_impl.rollbackSimon Ser
Most of the pending output state is not forwarded to the backend prior to an output commit. For instance, wlr_output_set_mode just stashes the mode without calling any wlr_output_impl function. wlr_output_impl.commit is responsible for applying the pending mode. However, there are exceptions to this rule. The first one is wlr_output_attach_render. It won't go away before renderer v6 is complete, because it needs to set the current EGL surface. The second one is wlr_output_attach_buffer. wlr_output_impl.attach_buffer is removed in [1]. When wlr_output_rollback is called, all pending state is supposed to be cleared. This works for all the state except the two exceptions mentionned above. To fix this, introduce wlr_output_impl.rollback. Right now, the backend resets the current EGL surface. This prevents GL commands from affecting the output after wlr_output_rollback. This patch is required for FBO-based outputs to work properly. The compositor might be using FBOs for its own purposes [2], having leftover FBO state can have bad consequences. [1]: https://github.com/swaywm/wlroots/pull/2097 [2]: https://github.com/swaywm/wlroots/pull/2063#issuecomment-597614312
2020-04-08output: check buffer in wlr_output_testSimon Ser
Check that buffer can be scanned out in wlr_output_test instead of wlr_output_attach_buffer. This allows the backend to have access to the whole pending state when performing the check. This brings the wlr_output API more in line with the KMS API. This removes the need for wlr_output_attach_buffer to return a value, and for wlr_output_impl.attach_buffer.
2020-04-08output: introduce wlr_output_testSimon Ser
2020-04-02buffer: add width and heightSimon Ser
2020-04-02buffer: add a release eventSimon Ser
Consumers call wlr_buffer_lock. Once all consumers are done with the buffer, only the producer should have a reference to the buffer. In this case, we can release the buffer (and let the producer re-use it).
2020-04-02buffer: add destroy eventSimon Ser
2020-03-29Gracefully handle inert wl_output resourcesSimon Ser
Closes: https://github.com/swaywm/wlroots/issues/2088
2020-03-24Return false on wlr_keyboard_set_keymap() failureIsaac Freund
This allows users of the library to handle or ignore the error as they see fit.
2020-03-23Return failure of wlr_renderer_init_wl_display()Isaac Freund
This makes it easier for the user of this library to properly handle failure of this function. The signature of wlr_renderer_impl.init_wl_display was also modified to allow for proper error propagation.
2020-03-14Send pointer enter/leave on capability changeIsaac Freund
This is more correct according to the protocol and fixes issues with clients that wait for an enter event before processing pointer events.
2020-03-13Send keyboard enter/leave on capability changeIsaac Freund
This is more correct according to the protocol and fixes issues with clients that wait for an enter event before processing key events
2020-03-12output: replace wlr_output.damage with a damage eventSimon Ser
This patch disambiguates the needs_frame event by uncoupling it from damage. A new separate damage event is emitted when the backend damages the output (this happens e.g. VT is changed or software cursors are used). The event specifies the damaged region. The wlr_output.damage field is removed. wlr_output is no longer responsible for tracking its own damage, this is wlr_output_damage's job. This is a breaking change, but wlr_output_damage users shouldn't need an update. Bugs fixed: - Screen flashes on VT switch - Cursor damage issues on the X11 and headless backends Closes: https://github.com/swaywm/sway/issues/5086
2020-03-09buffer: remove unused wlr_client_buffer fieldsSimon Ser
Forgot to remove these, they are superseded by fields in wlr_buffer. Some functions were still using them. Fixes: 8afc1ed68cfa ("Introduce wlr_client_buffer") Closes: https://github.com/swaywm/sway/issues/5087
2020-03-06xwayland: remove underscore prefix from atom namesSimon Ser
Previously, some atoms had a leading underscore, others didn't. Be more consistent and never use a leading underscore (symbols with a leading underscore followed by an upper-case letter are reserved).
2020-03-06xwayland: remove duplicate _NET_WM_NAME entrySimon Ser
2020-03-06xwayland: use explicit indexes when initializing atom_mapSimon Ser
It's very easy to break the mapping between the atom_name enum and the atom_map array. Use explicit indexes to prevent issues.
2020-03-06backend/drm: add support for adaptive_sync_enabledSimon Ser
The vrr_capable and VRR_ENABLED properties are used.
2020-03-06backend/x11: add support for adaptive_sync_enabledSimon Ser
This sets the _VARIABLE_REFRESH window property [1]. [1]: https://gitlab.freedesktop.org/mesa/mesa/blob/0616b7ac90cf4f86bb409d34101e3a3cceac8cbe/src/vulkan/wsi/wsi_common_x11.c#L1374