aboutsummaryrefslogtreecommitdiff
path: root/include
AgeCommit message (Collapse)Author
2021-01-09render/egl: document NULL config_attribs passed to wlr_egl_initSimon Ser
2021-01-09render/egl: use KHR function pointer typeSimon Ser
KHR is more "core" than EXT.
2021-01-09render/egl: document that config may be zeroSimon Ser
2021-01-08layer shell: add wlr_layer_surface_v1_popup_surface_at()Isaac Freund
This function will allow compositors to implement input handling in a way consistent with rendering more easily. Calling wlr_layer_surface_v1_surface_at() and checking if the result is a wlr_xdg_popup is flawed as there may be subsurfaces in the popup tree.
2021-01-08xdg shell: add wlr_xdg_surface_popup_surface_at()Isaac Freund
This function will allow compositors to implement input handling in a way consistent with rendering more easily. Calling wlr_xdg_surface_surface_at() and checking if the result is a wlr_xdg_popup is flawed as there may be subsurfaces in the popup tree.
2021-01-08xdg shell: add wlr_xdg_surface_for_each_popup_surface()Isaac Freund
When rendering, it is necessary to iterate the subsurfaces as well, so add a function that makes this easy.
2021-01-07xdg shell: make unconstrain_from_box arg constIsaac Freund
2021-01-07remove unnecessary egl includesSimon Zeni
2021-01-07backend: remove wlr_egl from all backendsSimon Zeni
2021-01-07types/seat: Clear focus in wlr_seat_destroy()Andri Yngvason
This fixes use-after-free in surface destroy signal listeners.
2021-01-06render: remove EGL config and visual from wlr_renderer_autocreateSimon Ser
This isn't used anymore by any backend. Some examples still provide an EGL config to wlr_egl_init, so we can't drop it yet there.
2021-01-05types: add wlr_xdg_foreign_v2Ilia Bozhinov
Co-authored-by: Jason Francis <cycl0ps@tuta.io>
2021-01-05types: add wlr_xdg_foreign_v1Ilia Bozhinov
Co-authored-by: Jason Francis <cycl0ps@tuta.io>
2021-01-05types: add wlr_xdg_foreign_registryIlia Bozhinov
2021-01-05xdg-shell: add wlr_xdg_toplevel_set_parentIlia Bozhinov
Co-authored-by: Jason Francis <cycl0ps@tuta.io>
2021-01-05util: add support for generating UUIDsIlia Bozhinov
Co-authored-by: Jason Francis <cycl0ps@tuta.io>
2021-01-05docs: wlr_surface_from_resource cannot return NULLIsaac Freund
Surfaces never become inert.
2021-01-04backend/session: allow wlr_session_find_gpus to return an errorSimon Ser
Sometimes wlr_session_find_gpus will encounter an error. This is different from finding zero GPUs. On error, wlr_session_find_gpus already returns -1. However, this is casted to size_t, so callers uncorrectly assume this is a success. Instead, make wlr_session_find_gpus return a ssize_t and allow callers to handle the error accordingly.
2021-01-03backend/drm: stash pending page-flip CRTCSimon Ser
wlr_drm_connector.crtc may be updated by the DRM backend while a page-flip is pending. In this case, the page-flip handler won't be able to find the right wlr_drm_connector from the CRTC ID. Save the CRTC when performing a page-flip to ensure we always find the right connector when we get the event.
2020-12-31noop: listen to display destroy and destroy the backendIlia Bozhinov
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-12-30backend/drm: remove special linear case for cursor planeSimon Ser
We now properly mark the cursor plane's formats as linear-only, and we now have a version of wlr_drm_format_intersect that handles the case of linear-only formats and implicit modifiers. We can remove the special drm_plane_init_surface flag we had for cursor planes. This also allows us to use a non-linear layout for cursor planes on drivers that support it. Tested on amdgpu GFX9.
2020-12-28backend/x11: create per-window present event contextsSimon Ser
The Present protocol states: > An event context is associated with a specific window; using an existing > event context with a different window generates a Match error. Instead of a global event context, use a per-window event context to fix this error: [backend/x11/backend.c:608] X11 error: op Present (SelectInput), code Match (no extension), sequence 63, value 4194307 Closes: https://github.com/swaywm/wlroots/issues/2577
2020-12-27backend/x11: implement a real rendering loopSimon Ser
Instead of using a timer, rely on X11 Present events and send a new frame event when the parent compositor displays a new frame on screen. The previous attempt at doing this [1] hit issues with EGLSurface, but we don't use that anymore. [1]: https://github.com/swaywm/wlroots/pull/1894
2020-12-25backend/drm: make listener names more idiomaticSimon Ser
Use the "<object>_<event>" notation for listeners, use "handle_<listener>" for handlers.
2020-12-23backend/drm: use plural form for possible_crtcsSimon Ser
Make it clearer that this is a bitmask of CRTC indices.
2020-12-22subsurface: handle NULL parent in get_root_surfaceIsaac Freund
2020-12-22backend/drm: remove drm_fb_acquireSimon Ser
Instead, import the buffer into GBM and KMS in drm_fb_import. Also move the multi-GPU copy there if necessary.
2020-12-22backend/drm: make drm_fb_acquire return a FB IDSimon Ser
2020-12-22backend/drm: drop export_drm_boSimon Ser
Not used anymore.
2020-12-21backend/x11: re-use pixmapsSimon Ser
Instead of re-importing a buffer each time we submit a frame, re-use the pixmaps if possible.
2020-12-21backend/wayland: re-use wl_buffersSimon Ser
Instead of re-importing a buffer each time we submit a new frame, re-use the wl_buffer objects if possible.
2020-12-18backend/drm: remove unused wlr_drm_plane.drm_formatSimon Ser
2020-12-18backend/drm: refactor wlr_output destructionSimon Ser
Instead of hand-rolling our own manual wlr_output cleanup function, rely on wlr_output_destroy to remove an output from the compositor's state.
2020-12-18backend/drm: introduce wlr_drm_connector.nameSimon Ser
The DRM backend is a little special when it comes to wlr_outputs: the wlr_drm_connectors are long-lived and are created even when no screen is connected. A wlr_drm_connector only advertises a wlr_output to the compositor when a screen is connected. As such, most of wlr_output's state is invalid when the connector is disconnected. We want to stop using wlr_output state on disconnected connectors. Introduce wlr_drm_connector.name which is always valid regardless of the connector status to avoid reading wlr_output.name when disconnected.
2020-12-18backend/drm: introduce wlr_drm_conn_logSimon Ser
Simplify and unify connector-specific logging with a new wlr_drm_conn_log macro. This makes it easier to understand which connector a failure is about, without having to explicitly integrate the connector name in each log message.
2020-12-18util/time: add timespec_from_nsecSimon Ser
2020-12-18render/drm_format_set: add wlr_drm_format_{create,add}Simon Ser
2020-12-17backend/drm: add wlr_drm_backend.nameSimon Ser
Save the DRM device name in a wlr_drm_backend field, so that we can easily use it for logging purposes.
2020-12-15backend/drm: add wlr_drm_connector.backendSimon Ser
This allows the DRM code to have direct access to the wlr_drm_backend without having to go through an upcast via get_drm_backend_from_backend.
2020-12-13backend/drm: stop using GBM flagsSimon Ser
gbm_bo_create_with_modifiers doesn't take GBM flags, so our wlr_gbm_allocator interface doesn't either. We were still internally using GBM flags in the DRM backend, leading to awkward back-and-forth conversions. The only flag passed to drm_plane_init_surface was GBM_BO_USE_LINEAR, so turn that into a bool to make sure other flags can't be passed in. Move the "force linear" logic out of init_drm_surface, because the supplied wlr_drm_format should already contain that information.
2020-12-13backend/x11: query modifiers supported by X11 serverSimon Ser
2020-12-13backend/x11: switch to wlr_swapchainSimon Ser
2020-12-13backend/wayland: use wlr_swapchain for cursor surfaceSimon Ser
2020-12-13backend/wayland: use wlr_swapchain for main surfaceSimon Ser
The cursor surface still uses a wl_egl_window. References: https://github.com/swaywm/wlroots/issues/1352
2020-12-09backend/drm: remove EGL configSimon Ser
Since we're using wlr_swapchain, we don't need to provide an EGL config.
2020-12-08backend/drm: stop tracking overlay planesSimon Ser
We don't do anything with them. Once we do, we can easily add this back.
2020-12-07docs: fix error in wlr_output_set_damage() commentIsaac Freund
output-buffer-local coordinates are neither scaled nor transformed
2020-12-07xwayland: use pipe instead of SIGUSR1 to signal readinessDominik Honnef
Closes: https://github.com/swaywm/wlroots/issues/2154
2020-12-03render/drm_format_set: introduce wlr_drm_format_intersectSimon Ser
Intersects modifiers from two wlr_drm_format structs. If either format doesn't support modifiers, the resulting format won't support modifiers.