aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-03-23linux-dmabuf-v1: always advertise support for implicit modifiersSimon Ser
Some clients (like Xwayland) will fallback to wl_drm if the compositor doesn't explicitly advertise support for implicit modifiers, even when the compositor supports explicit modifiers. This behavior sounds correct from a protocol point of view.
2021-03-22examples/dmabuf-capture: stop using av_init_packetSimon Ser
It's deprecated in ffmpeg >= 4.4. Closes: https://github.com/swaywm/wlroots/issues/2798
2021-03-22ci: update xwayland dep on alpineSimon Ser
The xwayland package has changed its name.
2021-03-16Fix buffer blit matricesSimon Ser
There was a missing wlr_matrix_scale call, so we ended up with black frames. Closes: https://github.com/swaywm/wlroots/issues/2780
2021-03-16screencopy: stop using wlr_renderer_blit_dmabufSimon Ser
The original motivation is the following crash: #0 0x00007f0ddeddeef5 in raise () at /usr/lib/libc.so.6 #1 0x00007f0ddedc8862 in abort () at /usr/lib/libc.so.6 #2 0x00007f0ddedc8747 in _nl_load_domain.cold () at /usr/lib/libc.so.6 #3 0x00007f0ddedd7646 in () at /usr/lib/libc.so.6 #4 0x00007f0de033f8de in gles2_get_renderer_in_context (wlr_renderer=0x612000003640) at ../subprojects/wlroots/render/gles2/renderer.c:38 #5 0x00007f0de0341675 in gles2_begin (wlr_renderer=0x612000003640, width=3840, height=2160) at ../subprojects/wlroots/render/gles2/renderer.c:186 #6 0x00007f0de033b100 in wlr_renderer_begin (r=0x612000003640, width=3840, height=2160) at ../subprojects/wlroots/render/wlr_renderer.c:56 #7 0x00007f0de03466ed in gles2_blit_dmabuf (wlr_renderer=0x612000003640, dst_attr=0x60b000150148, src_attr=0x7fff9f9bfde0) at ../subprojects/wlroots/render/gles2/renderer.c:591 #8 0x00007f0de033d717 in wlr_renderer_blit_dmabuf (r=0x612000003640, dst=0x60b000150148, src=0x7fff9f9bfde0) at ../subprojects/wlroots/render/wlr_renderer.c:210 #9 0x00007f0de04cbc3b in frame_handle_output_commit (listener=0x611000220bc8, data=0x7fff9f9c0050) at ../subprojects/wlroots/types/wlr_screencopy_v1.c:303 The GLES2 renderer assumes it'll have a wlr_buffer to render to. Instead of accomodating for the edge-case of rendering without a wlr_buffer, drop wlr_renderer_blit_dmabuf calls and instead use wlr_renderer_bind_buffer just like the rest of the wlr_renderer users. wlr_renderer_blit_dmabuf is now unused in wlroots. The upside is that the new blit_dmabuf function in screencopy is renderer-agnostic.
2021-03-15docs: Minor libseat correctionsKenny Levinsen
2021-03-15backend/session/libseat: Set loglevel to INFOKenny Levinsen
2021-03-15render/egl: don't fail on EGL_MESA_device_softwareSimon Ser
Mesa may advertise EGL_MESA_device_software even when hardware drivers are in use [1]. Demote the error to a warning until the Mesa bug is fixed. [1]: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4178 References: https://github.com/swaywm/wlroots/pull/2689
2021-03-11output: fix transform matrix for 90/270 rotationsSimon Ser
We need to adjust the second translation depending on the transform we applied. Fixes: 9601a2abf024 ("output: improve transform matrix calculation" Closes: https://github.com/swaywm/wlroots/issues/2774
2021-03-10output: improve transform matrix calculationSimon Zeni
Compute only the transform matrix in the output. The projection matrix will be calculated inside the gles2 renderer when we start rendering. The goal is to help the pixman rendering process.
2021-03-09output: document hotspot coord spaceSimon Ser
2021-03-09backend/x11: clamp hotspot to texture boundsIlia Mirkin
When a new texture is set, the hotspot may actually belong to the previous texture and be out of bounds. Rather than incur X errors for these, clamp the hotspot to be inside of the texture. This fixes weston examples updating their cursors (e.g. weston-eventdemo).
2021-03-08xcursor: use strncat instead of strncpyLukas Märdian
strncat appends '\0' automatically and avoids the stringop-truncation warning/error
2021-03-08Fix false positive -Wstringop-truncationLukas Märdian
Fix false positive stringop-truncation warning/error with GCC 10 on s390x by indicating GCC to explicitly ignore this case, as it is clearly a false positive (NUL is set in the following line). This allow the compilation to succeed with -Werror on. Fixes: https://github.com/swaywm/wlroots/issues/2018
2021-03-07wlr_seat_pointer: Remove log on notify_buttonKenny Levinsen
2021-03-05backend/drm: add new writeback and SPI connector typesSimon Ser
We already depend on libdrm 2.4.95, which is the first to have the writeback connector type.
2021-03-03xwayland: use -listenfd if availableSimon Ser
Xwayland's -listen option was deprecated in [1] in favor of -listenfd. [1]: https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/593
2021-03-03xwayland: check executable exists on initSimon Ser
Instead of walking PATH like a previous proposal [1], this one checks that the Xwayland path specified in the pkg-config file exists. I think this is a reasonable compromise: - Users that don't have Xwayland installed system-wide won't get a bogus DISPLAY env variable set up. - Users that have WLR_XWAYLAND set won't be affected by this check. - Users that have Xwayland installed system-wide and a different Xwayland in their PATH still get their custom Xwayland. - Users that don't have Xwayland installed system-wide but have it somewhere else in PATH are left out. But this is pretty niche, and they can just set WLR_XWAYLAND. [1]: https://github.com/swaywm/wlroots/pull/2314
2021-03-03xwayland: add dependency on xwaylandSimon Ser
Check that the pkg-config file is available. This will be required in the future to check whether xwayland supports features such as -listenfd, -initfd or -verbose. If there's no pkg-config file, check that the Xwayland executable is available. This effectively makes our relationship with xwayland closer to what a dynamic library is: checked at build-time, but can be overridden at run-time.
2021-02-28backend/session: fix KMS device filteringSimon Ser
As explained in [1], user-space should perform a drmModeGetResources call to figure out whether a device supports KMS. [1]: https://gitlab.freedesktop.org/mesa/drm/-/merge_requests/127
2021-02-23readme: use references for linksSimon Ser
Avoids cluttering the text with URLs.
2021-02-23readme: use spaces for list indentSimon Ser
2021-02-23readme: make it clear build/ is a dirSimon Ser
Can be confused with a sub-command for people not familiar with Meson and ninja.
2021-02-23examples: add libdrm partial dependency for compositorsSimon Ser
Fixes: 675bc396583f ("Fix wl_shm_format passed to wlr_texture_from_pixels")
2021-02-23Fix wl_shm_format passed to wlr_texture_from_pixelsSimon Ser
Fixes: 27fba3df4347 ("render: use DRM formats in wlr_texture_from_pixels")
2021-02-23buffer: add missing convert_wl_shm_format_to_drm callSimon Ser
Fixes: 27fba3df4347 ("render: use DRM formats in wlr_texture_from_pixels") Closes: https://github.com/swaywm/wlroots/issues/2757
2021-02-23build: rollback -Wformat=2Simon Ser
Causes some build failures on Clang. Fixes: 4b43aebdc7ed ("build: add -Wformat=2 -Walloca")
2021-02-23build: add -Wformat=2 -WallocaSimon Ser
2021-02-23Remove unnecessary wayland-server-protocol.h includesSimon Ser
2021-02-23render: use DRM formats in wlr_texture_from_pixelsSimon Ser
2021-02-23render: use DRM formats in wlr_renderer_read_pixelsSimon Ser
2021-02-23output: use DRM format in wlr_output_preferred_read_formatSimon Ser
2021-02-23render: use DRM formats in wlr_renderer_get_shm_texture_formatsSimon Ser
2021-02-23render/gles2: replace wlr_gles2_texture.wl_format with drm_formatSimon Ser
2021-02-23render/gles2: convert format table to DRM formatsSimon Ser
2021-02-23render/shm_format: add wl_shm_format conversion helpersSimon Ser
2021-02-19render/gles2: remove current_buffer checksSimon Ser
All backends now use wlr_swapchain. This means the renderer is guaranteed to have a current_buffer bound. Remove the legacy code used for EGLSurface.
2021-02-19render/gles2: check buffer stride when uploading textureSimon Ser
If the stride is too small, the driver could end up segfaulting (e.g. radeonsi segfaults in __memmove_sse2_unaligned_erms).
2021-02-18backend: add error messages in attach_render implsSimon Ser
2021-02-17surface: don't send protocol error on invalid buffer sizeSimon Ser
A libwayland-cursor bug [1] makes many clients crash. [1]: https://gitlab.freedesktop.org/wayland/wayland/-/issues/194 Fixes: 91fa2ff3959a ("surface: check buffer size is compatible with scale") Closes: https://github.com/swaywm/sway/issues/6014
2021-02-17surface: move INVALID_SIZE check into surface_state_finalizeSimon Ser
This fixes some build warnings. Closes: https://github.com/swaywm/wlroots/issues/2740 References: https://github.com/swaywm/wlroots/pull/2736
2021-02-15build: bump meson version to 0.56.0Simon Ser
Fixes this warning: WARNING: Project targeting '>=0.54.0' but tried to use feature introduced in '0.56.0': variables as dictionary. Fixes: 6f873078d4c0 ("build: use dictionnary for features instead of configuration_data")
2021-02-15Replace leftover conf_data with featuresSimon Ser
2021-02-15text_input_v3: correct typo in enum fieldTadeo Kondrak
2021-02-15build: set pkg-config variables for our featuresSimon Ser
this avoids having to parse the config.h file from builds systems of projects using wlroots.
2021-02-15build: set have_* dep variables for our featuresSimon Ser
This allows users to to something like this when wlroots is used as a subproject: wlr_has_xwayland = wlroots.get_variable('have_xwayland') Instead of having to parse conf_data from the subproject object.
2021-02-15build: use dictionnary for features instead of configuration_dataSimon Ser
This allows us to easily iterate on all features and only deal with bools.
2021-02-15xwayland/selection: flush connection after changing xwm selection ownerTudor Brindus
This was the actual underlying cause of #2192; we were not getting the XFIXES_SELECTION_NOTIFY event in time.
2021-02-15xwayland/selection: log when proxy window loses ownershipTudor Brindus
2021-02-15xwayland/selection: ignore requests for anything but the newest dataTudor Brindus
Our internal state machine gets screwed up if selection events are not monotonically increasing in time, and we can enter a self-copy loop from the proxy window that exhausts all pipes. Snippet of logs when this occurs: 00:00:46.238 [wlr] [xwayland/selection/incoming.c:487] XCB_XFIXES_SELECTION_NOTIFY (selection=277, owner=4194626) 00:00:46.238 [wlr] [xwayland/selection/incoming.c:487] XCB_XFIXES_SELECTION_NOTIFY (selection=277, owner=2097153) 00:00:46.238 [wlr] [xwayland/selection/outgoing.c:378] XCB_SELECTION_REQUEST (time=58979563 owner=2097153, requestor=2097153 selection=277, target=279, property=278) 00:00:46.238 [wlr] [xwayland/selection/outgoing.c:397] ignoring old request from timestamp 58979563; expecting > 58979563 00:00:46.238 [wlr] [xwayland/selection/outgoing.c:29] SendEvent destination=2097153 SelectionNotify(31) time=58979563 requestor=2097153 selection=277 target=279 property=0 00:00:46.238 [wlr] [xwayland/selection/incoming.c:453] XCB_SELECTION_NOTIFY (selection=277, property=0, target=279) Note that 2097153 is `selection->window`, and 4194626 is Emacs. The race occurs if the selection owner changes back to our proxy window between when we get `XCB_XFIXES_SELECTION_NOTIFY` for Emacs and when we call `xcb_convert_selection` in `incoming.c:source_send` -- the ConvertSelection request can end up hitting our proxy window, but the timestamp will be rejected. Fixes #2192.