aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2024-03-03types/wlr-action-binder: update protocolmasterAnna (navi) Figueiredo Gomes
Signed-off-by: Anna (navi) Figueiredo Gomes <navi@vlhl.dev>
2024-03-01ext-action-binder-v1: new protocol implementationAnna (navi) Figueiredo Gomes
Signed-off-by: Anna (navi) Figueiredo Gomes <navi@vlhl.dev>
2024-02-29wlr_tablet_v2: fix destroy listener nameIsaac Freund
2024-02-29input-device: unconfuse tablet namingIsaac Freund
WLR_INPUT_DEVICE_TABLET_TOOL is renamed to WLR_INPUT_DEVICE_TABLET The input device corresponds to wlr_tablet, not wlr_tablet_tool.
2024-02-29cursor: use switch for input device typeSimon Ser
Slightly improves the code style.
2024-02-29input-device: fix WLR_INPUT_DEVICE_TABLET_TOOL doc commentSimon Ser
wlr_tablet_tool is not a wlr_input_device. The name is confusing, but changing it would be a breaking change. Let's fix the docs as a first step.
2024-02-29tablet-v2: only send id event is vendor is setSimon Ser
Some tablets may not have a USB vendor/product set. References: https://gitlab.freedesktop.org/wayland/wayland-protocols/-/issues/180#note_2303637
2024-02-29backend/libinput: use NULL to indicate missing device nameSimon Ser
libinput guarantees that the name is non-NULL, and an empty string if unset. However wlroots uses NULL to indicate that an input device name is unset.
2024-02-28pointer: drop enum wlr_axis_orientationSimon Ser
Instead, use enum wl_pointer_axis from the Wayland protocol.
2024-02-28pointer: drop enum wlr_axis_relative_directionSimon Ser
Instead, use enum wl_pointer_axis_relative_direction from the Wayland protocol.
2024-02-28pointer: use enum wl_pointer_button_stateSimon Ser
2024-02-28pointer: drop enum wlr_axis_sourceSimon Ser
Instead, use enum wl_pointer_axis_source from the Wayland protocol.
2024-02-28input-device: add doc commentsSimon Ser
2024-02-27backend/drm: use CRTC pointers instead of indices in realloc_crtcs()Simon Ser
Improves readability, no functional change.
2024-02-27backend/drm: improve CRTC reallocation pretty printingSimon Ser
Only print the list of connectors once, with both the old and new status. Use CRTC object IDs instead of CRTC indices. Make it obvious when a connector keeps the same CRTC.
2024-02-26backend/drm: move primary FB check after pending buffer logicSimon Ser
If a connector has no current/queued buffer, but has a pending buffer in the commit, we need to process that pending buffer before checking pending.primary_fb.
2024-02-26backend/drm: fix primary FB checkSimon Ser
When turning off a CRTC, we don't need a buffer. It doesn't matter whether this is a modeset or not: we always need a buffer even for regular page-flips as long as a connector is active. Fixes: 374daeb25603 ("backend/drm: Ensure a primary fb is available when configuring an output")
2024-02-26output: use output_pending_enabled() in output_basic_test()Simon Ser
2024-02-26backend/drm: use output_pending_enabled()Simon Ser
Use the helper instead of hand-rolling the logic.
2024-02-25backend/drm: Ensure a primary fb is available when configuring an outputAlexander Orzechowski
2024-02-25backend/drm: Remove dead codeAlexander Orzechowski
We can never hit the case where we try to light up an output without a buffer. output_ensure_buffer() will catch this for now, and when that's removed, output_basic_test() will catch this case.
2024-02-25backend/drm: Init connector after we try to allocate a crtc for itAlexander Orzechowski
drm_connect_state_init() will set primary_fd to null if no CRTC is active for the connector and can crash later if the code expects a CRTC (like when lighting up an output).
2024-02-23render/egl: drop wlr_egl_is_current()Simon Ser
This is unused.
2024-02-23render/egl: drop wlr_egl_save_context()Simon Ser
This is no longer used.
2024-02-23render/egl: add save_context parameter to wlr_egl_make_current()Simon Ser
Saving the old context and immediately making our own context current is a common pattern. Let's make it easier to do. No functional change, just refactoring.
2024-02-23xwayland: add map_request signalJohn Lindgren
For XWayland surfaces that start maximized, it's best to send an initial Configure event to set the size of the surface before mapping it. This reduces visual glitches since the application sees the correct maximized size when performing its initial layout and drawing. wlroots surfaces emit their first "map" event after the XWayland window has already been mapped and the first frame has been drawn & committed. This is too late to send the initial Configure event. So, add a new "map_request" event which is emitted immediately before telling XWayland to map the window. Compositors can connect to this event to send the initial Configure event to an XWayland app based on its requested maximized (or fullscreen) state. Compositors should not place anything visually on the screen at this point but rather wait until the "map" event as before.
2024-02-22xwayland/xwm: Initialize client_id_cookieKenny Levinsen
scan-build is a little confused, thinking xwm->xres value could change during the execution of xwayland_surface_create so client_id_cookie could end up used uninitialized. The struct is just an unsigned int, so no harm in initializing it to get it off the list.
2024-02-22gamma-control-v1: Remove dead variable assignmentKenny Levinsen
2024-02-22render/vulkan: Avoid double-free on calloc errorKenny Levinsen
In query_modifier_support, the calloc for either or both of render_mods and texture_mods may fail, in which case both are freed for convenience. However, if one is non-NULL, vulkan_format_props_finish will try to free it again. NULL them to avoid double-free.
2024-02-22render/drm_format_set: Clean up on union failureKenny Levinsen
If drm_format_set_extend fails, we need to make sure each wlr_drm_format is cleaned up together with the formats array. Finish the set to take care of it.
2024-02-22xwayland/xwm: Allocate to the right variableKenny Levinsen
837060f894a4 made a change to only allocate the xcb_window_t array if it was not going to be zero-sized. It accidentally shadowed the variable so the output of the allocation would never be used. Regressed-by: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4563
2024-02-22xwayland/xwm: Avoid zero-size allocaitonKenny Levinsen
Zero-sized allocations have glibc-specific behavior, so avoid those.
2024-02-22drm-lease-v1: Free the wlr_drm_lease_v1 on errorKenny Levinsen
2024-02-22backend/drm: Remove erroneous freeKenny Levinsen
init_plane tries to free a single plane on error, but this is an element in a calloc'd array by the caller that we should not touch.
2024-02-22backend/drm: Free current_modeinfo on errorKenny Levinsen
2024-02-21backend/drm: don't destroy previous DRM master blobsSimon Ser
On startup, we fetch the previous MODE_ID blob ID so that compositors can keep using the previous mode if they want to. However, that blob doesn't belong to us, it belongs to the previous DRM master. As a result, we get an error when trying to destroy it. Fix this by tracking whether the blob belongs to us or not. Closes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3811
2024-02-21backend/drm: fix broken link to KMS property docsSimon Ser
The Linux graphics section of 01.org is no more. Link to more official docs instead.
2024-02-21buffer: add single-pixel-buffer-v1 special case in buffer_is_opaque()Simon Ser
2024-02-20scene: ignore duplicate wlr_scene_output_layout_add_output() callsSimon Ser
An assert was added in [1] to avoid tracking the same output multiple times. However, this is cumbersome for compositors [2]: they need to add a special check for this. Additionally, this is inconsistent with wlr_output_layout_add(). [1]: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4380 [2]: https://github.com/cage-kiosk/cage/pull/315
2024-02-15Define _POSIX_C_SOURCE globallySimon Ser
Stop trying to maintain a per-file _POSIX_C_SOURCE. Instead, require POSIX.1-2008 globally. A lot of core source files depend on that already. Some care must be taken on a few select files where we need a bit more than POSIX. Some files need XSI extensions (_XOPEN_SOURCE) and some files need BSD extensions (_DEFAULT_SOURCE). In both cases, these feature test macros imply _POSIX_C_SOURCE. Make sure to not define both these macros and _POSIX_C_SOURCE explicitly to avoid POSIX requirement conflicts (e.g. _POSIX_C_SOURCE says POSIX.1-2001 but _XOPEN_SOURCE says POSIX.1-2008). Additionally, there is one special case in render/vulkan/vulkan.c. That file needs major()/minor(), and these are system-specific. On FreeBSD, _POSIX_C_SOURCE hides system-specific symbols so we need to make sure it's not defined for this file. On Linux, we can explicitly include <sys/sysmacros.h> and ensure that apart from symbols defined there the file only uses POSIX toys.
2024-02-15util/log: drop unnecessary _XOPEN_SOURCESimon Ser
snprintf() is actually ISO C99. We still need POSIX for clock_gettime().
2024-02-15backend/drm: skip reset after VT switch if possibleSimon Ser
If all connectors and planes already have the right CRTC set, or are disabled, we can skip the device-wide reset after a VT switch. I've contemplated using a more fine-grained logic to only reset the connectors, CRTCs and planes that need to be migrated. However, writing a correct algorithm for this would be quite involved, and it doesn't seem worth the trouble anyways. Closes: https://github.com/swaywm/sway/issues/7956
2024-02-15backend/drm: fix typo in restore_drm_device() commentSimon Ser
2024-02-15backend/drm: move restore logic to drm.cSimon Ser
We'll need to use a bunch of internal functions from that file in the next commits.
2024-02-14backend/drm: atomically reset state after VT switchSimon Ser
Allows the KMS driver to parallelize the modesets, so should be faster than going through each CRTC one by one.
2024-02-14backend/drm: call get_drm_connector_props() when creating connectorSimon Ser
This function fetches property IDs. These don't change for the lifetime of the connector. Instead of refreshing the property IDs on hotplug (and leaving property IDs unset for disconnected connectors), only fetch the property IDs when we create the connector.
2024-02-14backend/drm: extract logic to build current connector stateSimon Ser
2024-02-14backend/drm: use early return in handle_session_active()Simon Ser
2024-02-14backend/drm: add destroy_blob()Simon Ser
Centralizes the logic to destroy a DRM blob: check whether it's zero, and print a nice error message.
2024-02-14backend/drm: drop wlr_drm_backend arg from create_mode_blob()Simon Ser
No need for this, the backend can be grabbed from the connector.