aboutsummaryrefslogtreecommitdiff
path: root/backend/x11/backend.c
AgeCommit message (Collapse)Author
2022-03-07interface/wlr_keyboard: rework destroy sequenceSimon Zeni
The destroy member in wlr_keyboard_impl has been removed. The function `wlr_keyboard_finish` has been introduce to clean up the resources owned by a wlr_keyboard. `wlr_input_device_destroy` no longer destroys the wlr_keyboard, attempting to destroy a wlr_keyboard will result in a no-op. The field `name` has been added to the wlr_keyboard_impl to be able to identify a given wlr_keyboard device.
2022-02-22interfaces: remove wlr_input_device_implSimon Zeni
2022-02-21backend/x11: remove wlr_input_device_implSimon Zeni
2022-02-21types/wlr_keyboard: add base wlr_input_deviceSimon Zeni
wlr_keyboard owns its base wlr_input_device. It will be initialized when the keyboard is initialized, and finished when the keyboard is destroyed.
2022-02-21types/wlr_input_device: default vendor and product id to 0Simon Zeni
vendor and product id are set when needed by the libinput backend
2021-11-26Require INVALID for implicit format modifiersSimon Ser
See [1] for the motivation. [1]: https://gitlab.freedesktop.org/wayland/wayland-protocols/-/merge_requests/75
2021-11-19output: use XRGB8888 format instead of ARGB8888Manuel Stoeckl
Most (and possibly all) compositors using wlroots only ever render fully opaque content. To provide better performance, this change switches the default format used by wlr_output buffers from ARGB8888 to the opaque XRGB8888. Compositors like mutter, kwin, and weston already default to XRGB8888, so this change is unlikely to expose any new bugs in underlying drivers and hardware. This does not affect the hardware cursor's buffer format, which is still ARGB8888 by default. As part of this change, the X11 backend (which does not support changing format at runtime) now picks a true color, 24 bit depth visual (i.e. XRGB8888) instead of a 32 bit depth (ARGB8888) one.
2021-10-01Revert "Require INVALID for implicit format modifiers"Simon Ser
This reverts commit ea7357b70366588069c83f158e6a4eb2d3a702b3.
2021-10-01Require INVALID for implicit format modifiersSimon Ser
See [1] for the motivation. [1]: https://gitlab.freedesktop.org/wayland/wayland-protocols/-/merge_requests/75
2021-09-30backend: create renderer and allocator in wlr_backend_autocreateSimon Ser
Instead of ensuring the renderer and allocator are initialized in each backend, do it in wlr_backend_autocreate. This allows compositors to create backends without any renderer/allocator if they side-step wlr_backend_autocreate. Since the wlr_backend_get_renderer and backend_get_allocator end up calling wlr_renderer_autocreate and wlr_allocator_autocreate, it sounds like a good idea to centralize all of the opimionated bits in one place.
2021-08-25Move allocator stuff into new directorySimon Ser
Add render/allocator/ and include/render/allocator/ to hold everything allocator-related.
2021-08-19backend: unify startup messagesSimon Ser
2021-07-01buffer: make enum wlr_buffer_cap publicSimon Ser
Custom backends and renderers need to implement wlr_backend_impl.get_buffer_caps and wlr_renderer_impl.get_render_buffer_caps. They can't if enum wlr_buffer_cap isn't made public.
2021-06-07backend/x11: remove swapchainSimon Ser
Rely on wlr_output's generic swapchain handling. We still need a renderer for cursor readback, sadly.
2021-06-07backend/x11: implement get_dmabuf_primary_formatsSimon Ser
2021-05-31backend: stop using renderer to get the buffer typeSimon Ser
When picking a format, the backend needs to know whether the buffers allocated by the allocator will be DMA-BUFs or shared memory. So far, the backend used the renderer's supported buffer types to guess this information. This is pretty fragile: renderers in general don't care about the SHM cap (they only care about the DATA_PTR one). Additionally, nothing stops a renderer from supporting both DMA-BUFs and shared memory, but this would break the backend's guess. Instead, use wlr_allocator.buffer_caps. This is more reliable since the buffers created with the allocator are guaranteed to have these caps.
2021-05-21backend/x11: use common renderer and allocatorSimon Ser
Instead of managing our own renderer and allocator, let the common code do it.
2021-05-21backend: introduce wlr_backend_finishSimon Ser
This new functions cleans up the common backend state. While this currently only emits the destroy signal, this will also clean up the renderer and allocator in upcoming patches.
2021-04-28backend: use wlr_allocator_autocreateSimon Zeni
2021-04-28backend: introduce backend_get_buffer_capsSimon Zeni
2021-04-28render/shm_allocator: make wlr_shm_allocator_create return a wlr_allocatorSimon Zeni
2021-04-28render/gbm_allocator: make wlr_gbm_allocator_create return a wlr_allocatorSimon Zeni
2021-04-20backend/x11: add support for shm buffersTadeo Kondrak
2021-04-15render: rename get_dmabuf_render_formats into get_render_formatsSimon Zeni
2021-04-14backend/x11: check for connection errorsSimon Ser
2021-04-09Remove WLR_HAS_XCB_ERRORSSimon Ser
wlroots' dependency on this library doesn't change the features exposed to compositors. It's purely a wlroots implementation detail. Thus downstream compositors shouldn't really care about it. Introduce an "internal_features" dictionary to store the status of such internal dependencies.
2021-02-08backend/x11: drop x11-xcb dependencySimon Ser
We don't need it anymore now that we've stopped using the EGL Xlib platform.
2021-02-05backend/x11: use native cursorsIlia Mirkin
Fixes #2659
2021-01-21backend/x11: keep track of exposed rects, add them to damage regionsIlia Mirkin
When we receive an Expose event, that means that we must redraw that region of the X11 window. Keep track of these regions with pixman regions, and merge them with the additional output damaged regions. Fixes #2670
2021-01-21backend/x11: skip events we don't care aboutIlia Mirkin
These are ones I see log messages about in my setup.
2021-01-18backend/x11: set a blank cursor rather than hiding globallyIlia Mirkin
This actually simplifies the logic since we no longer have to wait for enter/leave events, and also improves the UX when e.g. handling a crash with gdb attached. See #2659
2021-01-17backend/x11: add support for DRI3 1.0Simon Ser
Add fallbacks when DRI3 1.2 isn't supported. Closes: https://github.com/swaywm/wlroots/issues/2586
2021-01-17backend/x11: log DRM node nameSimon Ser
2021-01-17backend/x11: log when creating X11 backendSimon Ser
2021-01-16render: drop egl parameters from wlr_renderer_autocreateSimon Zeni
2021-01-16backend/x11: implement get_drm_fdSimon Ser
2021-01-07remove unnecessary egl includesSimon Zeni
2021-01-07backend: remove wlr_egl from all backendsSimon Zeni
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.
2020-12-31backend/x11: print version on extension errorSimon Ser
2020-12-30backend/x11: always open render nodeSimon Ser
If we get an authenticated primary node from the X11 server, don't use it because we can't authenticate our Wayland clients with it. Instead, open a render node. Closes: https://github.com/swaywm/wlroots/issues/2576
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-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-18backend/x11: use DRI3Open to get DRM FDSimon Ser
Instead of relying on EGL to retrieve the DRM FD, query it from the DRI3 extension. Use the EGL GBM platform, and drop the EGL config.
2020-12-17backend/x11: fix DRI3 formats not usedSimon Ser
We queried DRI3 formats, but we weren't using them. Because of a typo, only render formats were used. Fixes: c59aacf94465 ("backend/x11: query modifiers supported by X11 server") Closes: https://github.com/swaywm/wlroots/issues/2552
2020-12-15backend: use fcntl(F_DUPFD_CLOEXEC) instead of dupSimon Ser
This makes sure the CLOEXEC flag is set on the dup'ed FD.
2020-12-13backend/x11: query modifiers supported by X11 serverSimon Ser
2020-12-13backend/x11: switch to wlr_swapchainSimon Ser
2020-11-24backend/x11: log unhandled client messagesSimon Ser
2020-11-24backend/x11: log unhandled X11 eventsSimon Ser