aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-04-26backend/drm: clarify error message on drmModeAddFB fallbackSimon Ser
The previous code would always print "falling back to legacy method", even if the format wasn't ARGB8888. Drop get_fb_for_bo_legacy, since the code can just be inlined without hurting readability. Ideally we should only fallback to drmModeAddFB if the error code indicates the BE failure, but the original PR [1] doesn't say what error code is returned by the kernel. [1]: https://github.com/swaywm/wlroots/pull/2569
2021-04-26backend/drm: fail instead of stripping a modifierSimon Ser
We shouldn't strip a modifiers from buffers, because the will make the kernel re-interpret the data as LINEAR on most drivers, resulting in an incorrect output on screen.
2021-04-26xcursor: quiet debug logSimon Ser
Stop listing all available cursors each time a cursor theme is loaded. They can be obtained from the CLI instead, e.g. ls /usr/share/icons/Adwaita/cursors
2021-04-26Log drmGetDevices2 error codeSimon Ser
2021-04-26render: unconditionally read WLR_RENDERERSimon Ser
Prior to this commit, WLR_RENDERER was only looked up when the backend returned a DRM FD. Make it so WLR_RENDERER is always looked up, so that running wlroots on a system without a GPU and with WLR_RENDERER=gles2 fails as expected instead of falling back to the Pixman renderer.
2021-04-26render/egl: fail on EGL_MESA_device_softwareSimon Zeni
2021-04-24readme: use webchat link for IRC channelSimon Ser
GitHub refuses to render ircs:// URLs.
2021-04-24readme: mention IRC channelSimon Ser
2021-04-24readme: update and cleanup xcb depsSimon Ser
Switch from the pkg-config dependency names to the upstream libxcb repository names. Each repository contains multiple libraries but is generally available in distributions as a single package. libxcb contains xcb, xcb-composite, xcb-xfixes, xcb-xinput and xcb-shm. libxcb-render-util contains xcb-render. libxcb-wm contains xcb-icccm. xcb-image was outdated and is no longer needed.
2021-04-23xwayland: remove _NET_WM_PID handlerAleksei Bavshin
We already get the PID from XRes and _NET_WM_PID code can overwrite it with incorrect data.
2021-04-23xwayland: query window PIDs via XResQueryClientIdsAleksei Bavshin
`_NET_WM_PID` is unreliable: it is optional and even if set it may contain PIDs from sandbox namespaces or remote systems. Prefer XRes v1.2 QueryClientIds method which returns PIDs as seen by the Xwayland server.
2021-04-22render: remove NULL checks in wlr_texture_impl.destroySimon Ser
The NULL check already exists in wlr_texture_destroy, no need to duplicate it in each impl
2021-04-22render/pixman: destroy textures on renderer teardownSimon Ser
2021-04-22render/gles2: destroy textures on renderer teardownSimon Ser
2021-04-22render/pixman: cleanup when renderer is destroyedSimon Ser
We were leaking wlr_pixman_buffers and a wlr_drm_format_set.
2021-04-21output: correctly handle outputs without a test() implSimon Ser
This fixes a crash when calling wlr_output_test() on a headless output. Closes: https://github.com/swaywm/sway/issues/6213
2021-04-21render/gles2: log when creating rendererSimon Ser
Make it clear GLES2 is being used. Before this commit, various GL-related information was printed, but not an easy-to-find line about which renderer is being picked up.
2021-04-20render: introduce WLR_RENDERER in wlr_renderer_autocreate_with_drm_fdSimon Zeni
This env var forces the creation of a specific renderer. If no renderer is specified, the function will try to create all of the renderers one by one until one is created successfuly.
2021-04-20render/gles2: introduce wlr_gles2_renderer_create_with_drm_fdSimon Zeni
2021-04-20backend/x11: add support for shm buffersTadeo Kondrak
2021-04-20render: Assert that texture dimensions are > 0nyorain
2021-04-20examples/rotation: remove unused includesSimon Zeni
2021-04-20examples: introduce quads exampleSimon Zeni
This examples uses `wlr_render_quad_with_matrix` to render coloured squares on the screen, and uses the rotation to make them spin on their middle.
2021-04-20Fix stuck keys on X11 backendtomKPZ
2021-04-19linux-dmabuf-v1: split params and bufferSimon Ser
Previously, the same struct was used for linux-dmabuf-v1 params and buffer. This made the whole logic a little bit awkward, because a wlr_dmabuf_v1_buffer could either be still being constructed, or be a complete buffer. Introduce a separate wlr_linux_buffer_params_v1 struct for buffer params still being constructed. Once the params are complete (ie. once the create request is sent), the params struct is destroyed and the buffer struct is created. This will help with [1] as well. [1]: https://github.com/swaywm/wlroots/issues/2664
2021-04-19linux-dmabuf-v1: drop some from_resource helpersSimon Ser
Drop wlr_dmabuf_v1_buffer_from_params_resource and wlr_linux_dmabuf_v1_from_resource. Contrary to wl_buffer, these resources are internal linux-dmabuf-v1 implementation details and should not be shared with other interfaces.
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: remove dependency on GLES2 for compositor examplesSimon Ser
Most of the examples had a GLES2 dependency, but weren't using it. Convert multi-pointer to wlr_renderer instead of using directly glClear.
2021-04-19examples: use wlr_output_preferred_modeSimon Ser
2021-04-18backend/session: Close remaining devices on destroyKenny Levinsen
2021-04-18backend/session: Close fd in wlr_session_close_fileKenny Levinsen
This was lost in the session_impl removal refactor.
2021-04-17render: make GLES2 renderer optionalayaka
Allow selecting whether the GLES2 renderer gets enabled. Co-authored-by: Simon Ser <contact@emersion.fr>
2021-04-17renderer: create pixman renderer if getting drm fd failedSimon Zeni
2021-04-17render: introduce pixman rendererSimon Zeni
2021-04-17backend/wayland: fallback to wl_shm on missing render nodeSimon Ser
2021-04-17backend/wayland: add support for wl_shm buffersSimon Ser
2021-04-17render: introduce shared memory allocatorSimon Ser
It allocates in local main memory via shm_open, and provides a FD to allow sharing with other processes. This is suitable for software rendering under the Wayland and X11 backends.
2021-04-17buffer: introduce wlr_buffer_get_shmSimon Ser
References: https://github.com/swaywm/wlroots/issues/2399#issuecomment-769408708
2021-04-17buffer: introduce wlr_buffer_get_data_ptrSimon Zeni
The function has been place in an internal header for API stability reasons.
2021-04-17readme: mark libseat as mandatory depSimon Ser
[1] has made wlroots unconditionally depend on libseat. Mention this in the README. [1]: https://github.com/swaywm/wlroots/pull/2839
2021-04-16xwayland/sockets: ensure proper permissionsRyan Farley
Create a private UNIX socket directory (755), or use an existing one but ensure proper permissions are set to prevent meddling from other users.
2021-04-16examples/rotation: error out on invalid optionSimon Ser
2021-04-15render: rename get_dmabuf_render_formats into get_render_formatsSimon Zeni
2021-04-15render/gles2: prevent imported DMA-BUF textures from being mutatedSimon Ser
The compositor shouldn't write to client buffers if the client attaches a DMA-BUF to a wl_surface, then attaches a shm buffer. Make gles2_texture_write_pixels return an error to prevent this from happening.
2021-04-14backend/x11: check for connection errorsSimon Ser
2021-04-14backend/drm: terminate display on drmHandleEvent failureSimon Ser
2021-04-14backend/libinput: terminate display on errorSimon Ser
2021-04-14backend/session: Remove session_implKenny Levinsen
libseat provides all session functionality, so there is no longer need for a session backend abstraction. The libseat device ID, seat handle and event loop handle are moved to the main wlr_session and wlr_device structs.
2021-04-14backend/session: Remove noop backendKenny Levinsen
This is instead delegated to libseat.
2021-04-14backend/session: Remove direct backendKenny Levinsen
This is instead delegated to libseat.