aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2023-02-01xdg-shell: convert to try_fromSimon Ser
References: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/884
2023-02-01xwayland/xwm: reset serial in xwayland_surface_dissociate()Simon Ser
The same X11 window can be used multiple times with a different wl_surface. Closes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3570
2023-02-01xwayland/xwm: introduce wlr_xwayland_surface_try_from_wlr_surface()Kirill Primak
This new function replaces wlr_surface_is_xwayland_surface() and wlr_xwayland_surface_from_wlr_surface().
2023-02-01examples: use NULL theme name instead of "default"Simon Ser
This leaves it up to wlr_xcursor_theme_load() to pick the theme name.
2023-02-01examples, tinywl: use "default" cursor instead of "left_ptr"Simon Ser
"left_ptr" is the X11 name, "default" is the cursor spec name.
2023-02-01xcursors: Alias existing cursor defaults to cursor-spec cursor namesConsolatis
wlr_xcursor_get_resize_name() returns cursor-spec [1] based names but the default cursor icons shipped in include/xcursor/cursor_data.h use traditional X cursor names instead. Compositors that use wlr_xcursor_get_resize_name() to resolve an edge to a cursor icon name may thus be unable to render appropriate cursor icons for users that don't have a cursor-spec compliant cursor theme installed on their system or have it installed in an unusual place. This patch adds cursor-spec cursor icon name aliases. [1] https://www.freedesktop.org/wiki/Specifications/cursor-spec/
2023-01-31xdg-shell: rename wlr_xdg_popup.committed to sent_initial_configureSimon Ser
We made a similar change to wlr_xdg_toplevel.
2023-01-31xdg-shell: rename wlr_xdg_toplevel.added to sent_initial_configureSimon Ser
This is more descriptive, and avoids the confusion with wlr_xdg_surface.added.
2023-01-31xdg-shell: remove unnecessary returnSimon Ser
We're at the end of the function anyways.
2023-01-31xdg-shell: reset added/committed flag on unmapSimon Ser
When a client attaches a NULL buffer to its wl_surface, it's unmapped. This resets the xdg_surface in its initial state. An extra NULL commit makes the compositor send an initial configure event. Note, wlr_xdg_toplevel.added is separate from wlr_xdg_surface.added. Closes: https://github.com/swaywm/sway/issues/7397
2023-01-31backend/drm: set "max bpc" property based on pixel formatSimon Ser
Since 1d581656c756 ("backend/drm: set "max bpc" to the max") we set the "max bpc" property to the maximum value. The kernel driver is supposed to clamp this value depending on hardware capabilities. All kernel drivers lower the value depending on the GPU capabilities. However, none of the drivers lower the value depending on the DP-MST link capabilities. Thus, enabling a 4k@60Hz mode can fail on some DP-MST setups due to the "max bpc" property. Additionally, it's not a good idea to unconditionally set "max bpc" to the max. A high bpc consumes more lanes and more clock speed, which means higher power consumption and the busy lanes cannot be used for something else (e.g. other data transfers on a USB-C cable). For now, let's tie the "max bpc" to the pixel format of the buffer. Introduce a heuristic to make "high bit-depth buffer" a synonym of "I want the best quality". This is not perfect: a "max bpc" higher than 8 might be desirable for pixel formats with a color depth of 8 bits, for instance when the color management KMS properties are used. But we don't really support that yet, so let's leave this for later. Closes: https://github.com/swaywm/sway/issues/7367
2023-01-26seat/keyboard: constify wlr_seat_keyboard_notify_enter()Simon Ser
2023-01-26seat/keyboard: constify wlr_seat_keyboard_notify_modifiers()Simon Ser
2023-01-26seat/keyboard: constify args in wlr_seat_keyboard_enter()Simon Ser
2023-01-26seat/keyboard: constify wlr_seat_keyboard_send_modifiers()Simon Ser
2023-01-26seat/keyboard: skip wl_array allocationSimon Ser
We can just create a wl_array from the array passed by the user. Here, wl_array is only necessary to make libwayland happy.
2023-01-24tinywl: fix extra whitespaceSimon Ser
2023-01-21wlr_scene: Send intersecting list of scene outputs for outputs_update signalAlexander Orzechowski
2023-01-21output-layout: improve closest point for no outputs caseKirill Primak
Without outputs, all points are equally invalid anyway, but for e.g. cursor warping it makes more sense to preserve the original position.
2023-01-19render/vulkan: check that requested size is smaller than maxSimon Ser
Fail with a clearer error when the requested size is too large. Without this, we allocate a buffer with a size smaller than what was requested. References: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/3975
2023-01-18vulkan: increase max stage size to support large buffersBrett Ernst
2023-01-18backend/drm: disable all CRTCs after VT switchSimon Ser
When the user switches away from the VT where wlroots is running, the new DRM master may mutate the KMS state in an arbitrary manner. For instance, let's say wlroots uses the following connector/CRTC mapping: - CRTC 42 drives connector DP-1 - CRTC 43 drives connector DP-2 Then the new DRM master may swap the mapping like so: - CRTC 42 drives connector DP-2 - CRTC 43 drives connector DP-1 wlroots needs to restore its own state when the user switches back. Some state is attached to wlr_drm_crtc (e.g. current FB), so reading back and adopting the CRTC/connector mapping left by the previous DRM master would be complicated (this was the source of other bugs in the past, see [1]). With the previous logic, wlroots merely tries to restore the state of each connector one after the other. This fails in the scenario described above: the kernel refuses to use CRTC 42 for DP-1, because that CRTC is already in-use for DP-2. Unfortunately with the legacy uAPI it's not possible to restore the state in one go. We need to support both legacy and atomic uAPIs, so let's fix the bug for the legacy uAPI first, and then improve the situation for the atomic uAPI as a second step [2]. We need to disable the CRTCs we're going to switch the connectors for. This sounds complicated, so let's just disable all CRTCs to simplify. This causes a black screen because of the on/off modesets, but makes VT switch much more reliable, so I'll take it. [1]: https://gitlab.freedesktop.org/wlroots/wlroots/-/commit/c6d8a11d2c438d514473b1cbe20e5550e7227472 [2]: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/3794 Closes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3342
2023-01-18render/vulkan: use correct source offset in read_pixelsllyyr
2023-01-16backend/x11: fix delta_discrete valueKirill Primak
Fixes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3563
2023-01-04subcompositor: Clean up subsurface_consider_mapAlexander Orzechowski
check_parent was unecessary: it only served to skip a trivial check and added more complexity than it was worth.
2023-01-04subcompositor: Clarify comment on subsurface mapped considerationAlexander Orzechowski
2023-01-04tinywl: Nuke view->{x, y}Alexander Orzechowski
Instead use the scene node position.
2023-01-03tablet-tool: revert bitfield in enum wlr_tablet_tool_tip_stateSimon Ser
This was changed to a bitfield by mistake. References: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/3484#note_1697926
2023-01-03backend/x11: fix initial value of wlr_x11_buffer.n_busySimon Ser
We lock the buffer there, so we need to initialize the n_busy count to 1 as well. Closes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3556
2022-12-23session-lock: send more protocol errorsIsaac Freund
The invalid_destroy and invalid_unlock protocol errors aren't currently sent by wlroots and instead left up to the compositor. However, we can handle these as well without much additional complexity. This also adds a missing wl_resource_destroy() call if the lock is inert in lock_handle_unlock_and_destroy().
2022-12-22addon: Remove extra newline from loggingAlexander Orzechowski
2022-12-22addon: Add more loggingAlexander Orzechowski
2022-12-22presentation-time: finish surface addonKirill Primak
Fixes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3554
2022-12-22xwayland/xwm: remove unnecessary surface_id resetSimon Ser
xwayland_surface_associate() already does this.
2022-12-22xwayland/xwm: assert that we're not overwriting when associatingSimon Ser
Make sure xwayland_surface_associate() is not called twice in a row without a xwayland_surface_dissociate() call in-between.
2022-12-22xwayland/xwm: dissociate even if surface is NULLKirill Primak
If a window is unmapped too quickly, we might receive UnmapNotify before we get the corresponding wl_surface, which will later lead to associating the same window twice. To fix this, move the NULL surface check to xwayland_surface_dissociate(), which makes resetting the unpaired link and the wl_surface object ID unconditional. Fixes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3552
2022-12-22util/addon: ensure the set is empty after finishKirill Primak
2022-12-22render/vulkan: always finish buffer addon on texture destroyKirill Primak
2022-12-22render/vulkan: remove NULL renderer check on texture destroyKirill Primak
2022-12-20cursor: compare to scaled coordsbi4k8
2022-12-18xwayland/xwm: constify needlesKirill Primak
2022-12-16backend/drm: check return value of get_drm_{connector,crtc}_props()Simon Ser
We already do it for get_drm_plane_props().
2022-12-15keyboard: improve documentationSimon Ser
2022-12-15backend/drm: remove wlr_drm_crtc.legacy_crtcSimon Ser
We only need it for one thing: gamma size. Moreover, some bits in the drmModeCrtc will become out-of-date, for instance the current mode, so let's avoid caching the whole struct and only keep what we know won't change.
2022-12-15backend/drm: fetch fresh legacy CRTC in connector_get_current_mode()Simon Ser
connect_drm_connector() may be called long after create_drm_connector(). During that time the DRM mode might have changed. Avoid working with stale information.
2022-12-14keyboard: only update LEDs when changedxiliuya
2022-12-13backend/drm: drop unused arg in connector_get_current_mode()Simon Ser
2022-12-13backend/drm: prevent out-of-bounds array access on unknown subpixelSimon Ser
If the kernel adds new enum entries for subpixel, don't read past the end of the subpixel_map array.
2022-12-13backend/drm: refuse to switch CRTC for enabled connectorSimon Ser
match_obj() might return a configuration where the CRTC for an enabled connector is switched to another one. We don't support this correctly: the wlr_output common code would need to query again the supported formats, re-allocate the swapchain, etc. What's more, the kernel doesn't even support this [1]: it requires planes to be disabled to change their CRTC, it rejects commits directly switching the CRTC used by a plane. [1]: https://cgit.freedesktop.org/drm/drm-misc/tree/drivers/gpu/drm/drm_atomic.c?h=6e90293618ed476d6b11f82ce724efbb9e9a071b#n697
2022-12-13backend/drm: rename wlr_drm_backend.outputs to connectorsSimon Ser
This list contains wlr_drm_connector entries, and there is no guarantee that the wlr_output fields are initialized.