aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-01-10backend/drm: add wlr_drm_buf.local_wlr_bufSimon Ser
2021-01-10backend/drm: introduce drm_fb_createSimon Ser
2021-01-10backend/drm: make wlr_drm_plane.{pending,queued,current}_fb pointersSimon Ser
This will be useful once we start re-using wlr_drm_fb.
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-08util: fix uuid support for freebsdRouven Czerwinski
Fixes: FAILED: subprojects/wlroots/libwlroots.so.7.p/util_uuid.c.o cc -Isubprojects/wlroots/libwlroots.so.7.p -Isubprojects/wlroots -I../subprojects/wlroots -Isubprojects/wlroots/include -I../subprojects/wlroots/include -Isubprojects/wlroots/protocol -I../subprojects/wlroots/protocol -I/usr/local/include -I/usr/local/include/libepoll-shim -I/usr/local/include/libdrm -I/usr/local/include/pixman-1 -Xclang -fcolor-diagnostics -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -Werror -std=c11 -g -DWLR_USE_UNSTABLE -Wundef -Wmissing-include-dirs -Wold-style-definition -Wpointer-arith -Winit-self -Wstrict-prototypes -Wendif-labels -Wstrict-aliasing=2 -Woverflow -Wmissing-prototypes -Wno-missing-braces -Wno-missing-field-initializers -Wno-unused-parameter '-DWLR_REL_SRC_DIR="../subprojects/wlroots/"' -Wno-missing-field-initializers -Wno-missing-braces -DHAS_LIBUUID=0 '-DICONDIR="/usr/local/share/icons"' -fPIC -pthread -D_THREAD_SAFE -MD -MQ subprojects/wlroots/libwlroots.so.7.p/util_uuid.c.o -MF subprojects/wlroots/libwlroots.so.7.p/util_uuid.c.o.d -o subprojects/wlroots/libwlroots.so.7.p/util_uuid.c.o -c ../subprojects/wlroots/util/uuid.c ../subprojects/wlroots/util/uuid.c:28:2: error: implicit declaration of function 'assert' is invalid in C99 [-Werror,-Wimplicit-function-declaration] assert(strlen(str) + 1 == 37); ^ ../subprojects/wlroots/util/uuid.c:28:2: error: this function declaration is not a prototype [-Werror,-Wstrict-prototypes] ../subprojects/wlroots/util/uuid.c:29:25: error: sizeof on array function parameter will return size of 'char *' instead of 'char [static 37]' [-Werror,-Wsizeof-array-argument] memcpy(out, str, sizeof(out)); ^ ../subprojects/wlroots/util/uuid.c:15:25: note: declared here bool generate_uuid(char out[static 37]) { ^ ../subprojects/wlroots/util/uuid.c:29:26: error: 'memcpy' call operates on objects of type 'char' while the size is based on a different type 'char *' [-Werror,-Wsizeof-pointer-memaccess] memcpy(out, str, sizeof(out)); ~~~ ^~~ ../subprojects/wlroots/util/uuid.c:29:26: note: did you mean to provide an explicit length? memcpy(out, str, sizeof(out)); Fixes #2616
2021-01-08xdg/layer shell: reduce code duplication in iteratorsIsaac Freund
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-07backend/drm: don't log errno on plane_get_next_fb failureSimon Ser
errno isn't guaranteed to be set after a plane_get_next_fb failure, so we were printing garbage.
2021-01-07tinywl: fix wlr_backend_autocreate callSimon Zeni
2021-01-07ci: build tinywlSimon 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-07layer shell: advertise version 3Isaac Freund
This should have been done in 45c0877 but was overlooked unfortunately.
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-05backend/wayland: remove unnecessary flags from event sourceSimon Ser
wl_event_loop_add_fd only accepts READABLE and WRITABLE. ERROR and HANGUP are always implicitly enabled.
2021-01-05gtk primary selection: destroy devices before managerIsaac Freund
Since device_destroy() calls wl_list_remove() on the device's link, the manager must still be valid. However if the manager is destroyed before the seat as the wl_display destroy handlers are called, devices listening for the seat to be destroyed will access free'd memory in wl_list_remove().
2021-01-05primary selection: destroy devices before managerIsaac Freund
Since device_destroy() calls wl_list_remove() on the device's link, the manager must still be valid. However if the manager is destroyed before the seat as the wl_display destroy handlers are called, devices listening for the seat to be destroyed will access free'd memory in wl_list_remove().
2021-01-05backend/wayland: Avoid uninitialized readKenny Levinsen
keyboard_handle_leave would always process 1 keycode more than was pending, which meant reading uninitialized memory from the "pressed" array. Found by valgrind.
2021-01-05docs: wlr_surface_from_resource cannot return NULLIsaac Freund
Surfaces never become inert.
2021-01-05toplevel-management: avoid redundant state eventsIsaac Freund
Check if there would be a state change on setting maximized, minimized, activated, or fullscreen before sending a state event.
2021-01-05toplevel-management: handle strdup failureIsaac Freund
Sending a NULL string to a client would be a violation of the protocol.
2021-01-05toplevel-management: ignore inert seatsIsaac Freund
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-04backend/wayland: re-use cursor wl_buffersSimon Ser
We were importing cursor buffers as wl_buffers over and over again. Instead, only import these once.
2021-01-04examples: request an EGL configSimon Ser
Client examples using wlr_egl would fail with EGL_BAD_CONFIG because they need an EGL config. Set the config attribs to a non-NULL value to make sure wlr_egl creates an EGL config. Fixes: 037710b1d428 ("render/egl: support config-less wlr_egl")
2021-01-04examples: remove visual for EGL_PLATFORM_WAYLAND_EXTSimon Ser
The Wayland EGL platform doesn't have visuals.
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.
2021-01-03backend/drm: ignore hotplug events while inactiveSimon Ser
When the session is inactive, we can't change the KMS state. Ignore hotplug events so that compositors don't try to perform a modeset when a connector is plugged in. We already re-scan connectors when the session becomes active. To test, run a wlroots compositor on VT 1, switch to VT 2, unplug a connector, re-plug it, switch back to VT 1. Without this patch the screen is black on VT 1. References: https://github.com/swaywm/wlroots/issues/2370
2020-12-31noop: listen to display destroy and destroy the backendIlia Bozhinov
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-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-30backend/drm: extract linear format creation into functionSimon Ser
Simplifies error handling.
2020-12-30render/drm_format_set: add special case for LINEAR-only formatsSimon Ser
Our wlr_format_set structs don't hold GBM usage flags. Instead, users who want to get a LINEAR buffer can use the DRM_FORMAT_MOD_LINEAR modifier even if the kernel driver doesn't support modifiers. Add a special case to wlr_drm_format_intersect to properly handle this situation.
2020-12-30backend/drm: force LINEAR for cursor plane formatsSimon Ser
If the kernel driver doesn't support modifiers, it still expects cursor FBs to have a LINEAR layout. See [1] for expectations for framebuffers attached to the cursor plane. [1]: https://patchwork.freedesktop.org/patch/408512/
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-28drm: add fallback drmModeAddFB for drivers which do not support drmModeAddFB2Ariadne Conill
This makes wlroots able to run on some big-endian machines like G4 and G5 systems with ATI Radeon 7500 AGP graphics.
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