aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-01-12render/egl: remove SURFACELESS_MESA special caseSimon Ser
Users can just pass EGL_DEFAULT_DISPLAY themselves.
2020-01-12text-input: fix missing destroy signal initxdavidwu
2020-01-10Drop RDP backendDrew DeVault
Users interested in remote access to wlroots compositors should use wayvnc: https://github.com/any1/wayvnc
2020-01-09backend/wayland: handle display errors more gracefullySimon Ser
Previously, an error on the remote Wayland display would result in an infinite loop priting: 2020-01-09 13:39:03 - [wayland] Source dispatch function returned negative value! 2020-01-09 13:39:03 - [wayland] This would previously accidentally suppress a follow-up dispatch This happens when the remote compositor disconnects the client because of a protocol error, for instance. Handle wl_display_dispatch and wl_display_dispatch_pending returning -1 by terminating the local display and printing an error.
2020-01-09backend/wayland: listen to wl_buffer.release eventsSimon Ser
Previously, we just assumed submitting a new frame would make the compositor release the current one. This isn't always the case, for instance Sway retains old buffers when a transaction is pending. This resulted in synchronization issues with clients writing in front-buffers. Fix this by un-referencing a wlr_buffer when the parent compositor sends wl_buffer.release. Tested by running a fullscreen mpv instance in Sway with the Wayland backend.
2020-01-08Allow WLR_RDP_PORT to be any valid TCP/UDP port numberJason
2020-01-06Update version to 0.9.1Drew DeVault
2020-01-05xwm: allow applications to change focus between their own surfacesIlia Bozhinov
Although currently this problem is present in only Steam, and it is actually a client bug.
2020-01-03virtual-pointer: Actually use the value passed to axis_discreteAndri Yngvason
It turns out that scrolling doesn't work unless this value is set somewhere.
2020-01-02backend/wayland: fix frame callback not registeredSimon Ser
This got removed in [1]. I probably messed up the rebase. [1]: https://github.com/swaywm/wlroots/pull/1797/files#diff-3065f86e6de87d143d4a7673a8ee3a2d Fixes: 5d1ba0f44687 ("output: re-introduce atomic mode, enabled, scale and transform")
2019-12-31Update version to 0.9.0Drew DeVault
2019-12-31render: guard rendering operations between begin() and end()Simon Ser
Add a wlr_renderer.rendering bool, set it to true between wlr_renderer_begin() and wlr_renderer_end(). Assert we're rendering when calling functions that render.
2019-12-31xwayland: Clean up if Xwayland fails to startScott Moreau
When running wlroots compositors with Xwayland executable bits unset, if DISPLAY is set to the display number wlroots has set up, then X and gtk clients (at least) hang when they are ran. X clients should fail with an error and exit while gtk clients should fall back to wayland backend and run correctly. This is because wlroots opened sockets for Xwayland but wasn't closing them if Xwayland failed to start.
2019-12-31virtual-pointer: Add support for the wlr-virtual-pointer-unstable-v1Josef Gajdusek
2019-12-30backend/drm: don't modeset with a NULL mode after TTY switchSimon Ser
This fixes a segfault in drm_connector_set_mode (mode = NULL). This happens because we set wlr_output.enabled to true if the connector is attached to the CRTC. When the user disables an output in the wlroots-based compositor, switches to another VT (enabling the output), then switches back, wlroots sets wlr_output.enabled to true but wlr_output.current_mode is NULL. We should consider not reading properties from KMS after a TTY switch, disabling all connectors. However this may result in flickering (outputs being disabled then re-enabled). Closes: https://github.com/swaywm/wlroots/issues/1874
2019-12-30output: only advertise current modeSimon Ser
- Regular clients shouldn't care about modes - Modes exposed are missing metadata such as aspect-ratio, interleaved, etc - Modes exposed cannot be pruned [1] - wlr-output-management provides a better API for privileged clients [1]: https://gitlab.freedesktop.org/wayland/wayland/issues/92 Closes: https://github.com/swaywm/wlroots/issues/1099
2019-12-30xdg-shell: make wlr_xdg_surface_from_resource reject NULLSimon Ser
Most resources must not be NULL. Make it so callers need to check for NULL explicitly. This makes it clearer in the handlers code that the NULL wl_resource case needs to be handled, and allows callers to make a difference between a NULL wl_resource and an inert resource.
2019-12-30xdg-shell: fix inert xdg_surface handlingSimon Ser
Closes: https://github.com/swaywm/sway/issues/4834 Closes: https://github.com/swaywm/wlroots/issues/1890
2019-12-30tinywl: enable and commit output when modesettingSimon Ser
While at it, choose the preferred mode instead of the last one.
2019-12-30output: refuse to commit a buffer or modeset a disabled outputSimon Ser
References: https://github.com/swaywm/wlroots/issues/1780#issuecomment-518938390
2019-12-30output: clear pending bit if pending == currentSimon Ser
In case the pending value is the same as the current value, clear the bit from pending.committed.
2019-12-30backend/drm: modeset before enabling an outputSimon Ser
This saves one modeset in case the previous mode is different.
2019-12-30output: re-introduce atomic mode, enabled, scale and transformSimon Ser
This reverts commit 01f903874b7e27539488fad7f31476d5bcbc6ac9 and re-applies commit ee5f98ad49fed0439f3313ec685307831d1d1d05. Updates: https://github.com/swaywm/wlroots/issues/1640 (Atomic output updates issue) See also: https://github.com/swaywm/wlroots/pull/1762 (Atomic output updates original PR) See also: https://github.com/swaywm/wlroots/issues/1780 (Issue caused by atomic output updates) See also: https://github.com/swaywm/sway/issues/4419 (Issue caused by atomic output updates) See also: https://github.com/swaywm/wlroots/pull/1781 (Revert PR)
2019-12-29wlr_keyboard_group: fix mem leak in refresh_stateBrian Ashworth
This fixes a memory leak the refresh_state function for wlr_keyboard_group. The event struct was being dynamically allocated and never free'd. This changes it to a static allocation.
2019-12-29output-management-v1: use wlr_output.descriptionSimon Ser
Unfortunately, the description isn't mutable yet for this protocol [1]. [1]: https://github.com/swaywm/wlr-protocols/issues/67
2019-12-29xdg-output-v1: use wlr_output.descriptionSimon Ser
Since [1], the xdg-output description is mutable. Listen to output description changes and send the new output description when updated. [1]: https://gitlab.freedesktop.org/wayland/wayland-protocols/commit/048102f21ad3783f64c4996704b07a13a010fd19
2019-12-29output: add descriptionSimon Ser
wlr_output.description is a string containing a human-readable string identifying the output. Compositors can customise it via wlr_output_set_description, for instance to make the name more user-friendly. References: https://github.com/swaywm/wlroots/issues/1623
2019-12-29ci: add a build run with all features disabledSimon Ser
Closes: https://github.com/swaywm/wlroots/issues/1255
2019-12-23Revert "ci: add xorgproto dep to Arch build"Simon Ser
This reverts commit 35bc3e662a34fe92a3de4e3768dc976f8ac2c242. Per [1], the dependency has been re-added and we shouldn't need to explicitly install it anymore. [1]: https://bugs.archlinux.org/task/64914
2019-12-23meson: Remove tag generationScott Anderson
This is insanely fruststating. Since it works off of currently committed git files, if you ever remove anything, your build will fail until you commit it. It doesn't even belong in the build system anyway, as it's only part of an individual's specific workflow. Use for own scripts for your own workflow. Go use some git hooks to generate this or something.
2019-12-23meson: Various improvementsScott Anderson
Bumps minimum version to 0.51.0 - Remove all intermediate static libraries. They serve no purpose and are just add a bunch of boilerplate for managing dependencies and options. It's now managed as a list of files which are compiled into libwlroots directly. - Use install_subdir instead of installing headers individually. I've changed my mind since I did that. Listing them out is annoying as hell, and it's easy to forget to do it. - Add not_found_message for all of our optional dependencies that have a meson option. It gives some hints about what option to pass and what the optional dependency is for. - Move all backend subdirectories into their own meson.build. This keeps some of the backend-specific build logic (especially rdp and session) more neatly separated off. - Don't overlink example clients with code they're not using. This was done by merging the protocol dictionaries and setting some variables containing the code and client header file. Example clients now explicitly mention what extension protocols they want to link to. - Split compositor example logic from client example logic. - Minor formatting changes
2019-12-22backend/session/freebsd: Fix the way to get TTY pathTing-Wei Lan
Previously, the path of TTY is generated using snprintf with %d format. It works with TTY 1 to 10, but fails with TTY with greater number because the number used in the name is in base 32 instead of base 10. Since there is no standard function to convert a number to a string with a custom base, this commit adds a function to do it. Fixes: https://github.com/swaywm/wlroots/issues/1854
2019-12-21render: fix EGL extensions not loadedSimon Ser
Some extensions are only advertised by the EGL implementation with a non-zero EGLDisplay. That's the case when the extension can only be enabled when the hardware/driver supports it for instance. Instead of checking for all extensions without a display, check only for EGL_EXT_platform_base and EGL_KHR_debug which are used before eglGetDisplay. Check for all other extensions when we have a display. Closes: https://github.com/swaywm/wlroots/issues/1955
2019-12-21ci: add xorgproto dep to Arch buildSimon Ser
Arch Linux maintainers are still figuring out whether they should ask people to explicitely install it or make it a dependency of libxcb again [1]. In the meantime, add it as an explicit dependency. I'll revert this patch if they decide otherwise. [1]: https://bugs.archlinux.org/task/64914
2019-12-20backend/drm: print preferred modeRouven Czerwinski
While printing the supported output modes, annotate the preferred mode.
2019-12-20Refactor EGL/GL API loadingSimon Ser
Remove glapi.sh code generation, replace it with hand-written loading code that checks extension strings before calling eglGetProcAddress. The GLES2 renderer still uses global state because of: - {PUSH,POP}_GLES2_DEBUG macros - wlr_gles2_texture_from_* taking a wlr_egl instead of the renderer
2019-12-18Send tablet tool frame on proximity_outmyfreeweb
Fixes GTK application crashes
2019-12-16output: fix wlr_output_preferred_mode fallbackSimon Ser
`mode` points to an invalid pointer (head of the list) when the loop stops. Closes: https://github.com/swaywm/sway/issues/4717
2019-12-14surface: don't unref the current buffer on failureSimon Ser
If wlr_buffer_create fails, keep the previous buffer.
2019-12-14buffer: improve error handlingSimon Ser
In case the texture can't be imported, release the buffer so that the client can submit another one. In case the allocation fails, disconnect the client.
2019-12-11backend/drm: add BenQ to manufacturer listSimon Ser
2019-12-09output: fix cursor wl_surface.{enter,leave} trackingManuel Stoeckl
This change ensures that wl_surface.leave is sent when a surface associated with the cursor is disassociated (when the cursor is reset).
2019-12-05backend/drm: fix segfault in init_drm_surfaceSimon Ser
When surf->gbm was previously set, we destroy it without setting it to NULL. Later on, we only create the GBM surface if surf->gbm is NULL. This result in a use-after-free when we start using surf->gbm. Closes: https://github.com/swaywm/wlroots/issues/1868 Closes: https://github.com/swaywm/wlroots/issues/1874 Closes: https://github.com/swaywm/sway/issues/4785 Closes: https://github.com/swaywm/sway/issues/4717 Closes: https://github.com/swaywm/sway/issues/4730 Fixes: 2bdd1d0896cc ("backend/drm: use modifiers for our GBM buffers")
2019-12-01backend/drm, backend/libinput: listen to session destroySimon Ser
This fixes a heap-use-after-free when the session is destroyed before the backend during wl_display_destroy: ==1085==ERROR: AddressSanitizer: heap-use-after-free on address 0x614000000180 at pc 0x7f88e3590c2d bp 0x7ffdc4e33f90 sp 0x7ffdc4e33f80 READ of size 8 at 0x614000000180 thread T0 #0 0x7f88e3590c2c in find_device ../subprojects/wlroots/backend/session/session.c:192 #1 0x7f88e3590e85 in wlr_session_close_file ../subprojects/wlroots/backend/session/session.c:204 #2 0x7f88e357b80c in libinput_close_restricted ../subprojects/wlroots/backend/libinput/backend.c:24 #3 0x7f88e21af274 (/lib64/libinput.so.10+0x28274) #4 0x7f88e21aff1d (/lib64/libinput.so.10+0x28f1d) #5 0x7f88e219ddac (/lib64/libinput.so.10+0x16dac) #6 0x7f88e21b415d in libinput_unref (/lib64/libinput.so.10+0x2d15d) #7 0x7f88e357c9d6 in backend_destroy ../subprojects/wlroots/backend/libinput/backend.c:130 #8 0x7f88e3545a09 in wlr_backend_destroy ../subprojects/wlroots/backend/backend.c:50 #9 0x7f88e358981a in multi_backend_destroy ../subprojects/wlroots/backend/multi/backend.c:54 #10 0x7f88e358a059 in handle_display_destroy ../subprojects/wlroots/backend/multi/backend.c:107 #11 0x7f88e314acde (/lib64/libwayland-server.so.0+0x8cde) #12 0x7f88e314b466 in wl_display_destroy (/lib64/libwayland-server.so.0+0x9466) #13 0x559fefb52385 in main ../main.c:67 #14 0x7f88e2639152 in __libc_start_main (/lib64/libc.so.6+0x27152) #15 0x559fefb4297d in _start (/home/simon/src/glider/build/glider+0x2297d) 0x614000000180 is located 320 bytes inside of 416-byte region [0x614000000040,0x6140000001e0) freed by thread T0 here: #0 0x7f88e3d0a6b0 in __interceptor_free /build/gcc/src/gcc/libsanitizer/asan/asan_malloc_linux.cc:122 #1 0x7f88e35b51fb in logind_session_destroy ../subprojects/wlroots/backend/session/logind.c:270 #2 0x7f88e35905a4 in wlr_session_destroy ../subprojects/wlroots/backend/session/session.c:156 #3 0x7f88e358f440 in handle_display_destroy ../subprojects/wlroots/backend/session/session.c:65 #4 0x7f88e314acde (/lib64/libwayland-server.so.0+0x8cde) previously allocated by thread T0 here: #0 0x7f88e3d0acd8 in __interceptor_calloc /build/gcc/src/gcc/libsanitizer/asan/asan_malloc_linux.cc:153 #1 0x7f88e35b911c in logind_session_create ../subprojects/wlroots/backend/session/logind.c:746 #2 0x7f88e358f6b4 in wlr_session_create ../subprojects/wlroots/backend/session/session.c:91 #3 0x559fefb51ea6 in main ../main.c:20 #4 0x7f88e2639152 in __libc_start_main (/lib64/libc.so.6+0x27152)
2019-12-01keyboard: emit key events without keymapSimon Ser
Sometimes compositors don't need an XKB keymap at all, they just handle raw keycodes. Emit key events even if no keymap is set.
2019-12-01Revert "output: add block_idle_frame"Simon Ser
This reverts commit cbb2781fed7944dae680a66a35443f5b1a678ec7. In [1], we found issues with block_idle_frame and replaced it with frame_pending. block_idle_frame is now unused. [1]: https://github.com/swaywm/sway/pull/4772
2019-11-28note libinput as welln3rdopolis
2019-11-28Update environment variable documentation to include more backendsn3rdopolis
Testing with exporting WLR_BACKENDS=drm worked, and it wasn't documented. Checking the backends folder, and it also mentions an RDP backend as well
2019-11-27virtual_keyboard: Accept keycode 0Dorota Czaplejewicz
2019-11-26render/gles2: do not set GL_TEXTURE_MAG_FILTERRonan Pigott