aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
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
2019-11-25Simplify globals implementation by removing destructorsSimon Ser
Some globals are static and it doesn't make sense to destroy them before the wl_display. For instance, wl_compositor should be created before the display is started and shouldn't be destroyed. For these globals, we can simplify the code by removing the destructor and stop keeping track of wl_resources (these will be destroyed with the wl_display by libwayland).
2019-11-25render: remove return in wlr_texture_get_sizeSimon Ser
Otherwise this error happens: ../subprojects/wlroots/render/wlr_texture.c: In function ‘wlr_texture_get_size’: ../subprojects/wlroots/render/wlr_texture.c:47:9: error: ISO C forbids ‘return’ with expression, in function returning void [-Werror=pedantic] 47 | return texture->impl->get_size(texture, width, height); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../subprojects/wlroots/render/wlr_texture.c:45:6: note: declared here 45 | void wlr_texture_get_size(struct wlr_texture *texture, int *width, | ^~~~~~~~~~~~~~~~~~~~
2019-11-23Use layer shell v2Timidger
2019-11-23Amend typoJason
2019-11-23Amend typosJason
2019-11-21backend/wayland: add support for presentation-timeSimon Ser
2019-11-21presentation-time: add helper for common caseSimon Ser
Most of the time, compositors just display the surface's current buffer on an output. Add an helper to make it easy to support presentation-time in this case.
2019-11-21presentation-time: make API more flexibleSimon Ser
The wlr_presentation_feedback struct now tracks presentation feedback for multiple resources (but still a single surface content update). This allows the compositor to properly send presentation events even when there is more than one frame of latency or when it references a surface's buffer.
2019-11-21output: fix off-by-one wlr_output_event_present.commit_seqSimon Ser
Backends not supporting presentation feedback call wlr_output_send_present with a NULL event in their commit handler. Since the commit hasn't been applied yet, commit_seq still has its old value. We need to increment it. An alternative would be to move commit_seq in wlr_output_state. This would allow to have a pending and a current commit_seq. wlr_output_send_present could take the pending commit_seq when called with a NULL event.
2019-11-21output: set wlr_output.commit_seq before firing the commit eventSimon Ser
This allows listeners to read the commit sequence number.
2019-11-20examples: set mode when creating shm objectJan Beich
$ screencopy shm_open failed failed to create buffer $ posixshmcontrol ls MODE OWNER GROUP SIZE PATH --------- foo foo 33177600 /wlroots-screencopy
2019-11-20Add -Wmissing-prototypesSimon Ser
This requires functions without a prototype definition to be static. This allows to detect dead code, export less symbols and put shared functions in headers.
2019-11-19backend/x11: Revert usage of present extensionScott Anderson
This reverts commit 3317134adff0ed179e0ecaea6d778dbd0684f771. This reverts commit a3c3b928a3814f1a44babf487b1508415958c721. There are some serious issues when running this on a real X server, as opposed to running this on Xwayland, where this was tested. More investigation needs to be done into why these issues happen and if our usage of the present extension is correct.
2019-11-19build: Pass library as first argument to pkgconfig.generate()Scott Moreau
Eliminates this warning when building wlroots as a subproject: subprojects/wlroots/meson.build:216: DEPRECATION: Library wlroots was passed to the libraries keyword argument of a previous call to generate() method instead of first positional argument. Adding wlroots to Requires field, but this is a deprecated behaviour that will change in a future version of Meson. Please report the issue if this warning cannot be avoided in your case.
2019-11-18backend/x11: Drop required present versionScott Anderson
We say 1.2, but I don't think we actually use anything that was introduced past 1.0.
2019-11-18backend: Do not attempt DRM on X11/WL failureScott Anderson
This can really mess with the session if logind is not being used, and it's going to always fail anyway.
2019-11-17output: add wlr_output_event_present.commit_seqSimon Ser
This is set to the value of wlr_output.commit_seq when the frame has been submitted. This allows tracking presentation with more then 1 full frame of latency. References: https://github.com/swaywm/wlroots/issues/1917
2019-11-13backend/wayland: expose remote objectsSimon Ser
Expose the remote wl_display, wl_surface and wl_seat used by the Wayland backend. This allows compositors to customize the Wayland backend and to have more freedom. For instance a compositor might want to handle clipboard and drag-and-drop from the remote Wayland compositor. Another compositor might want to setup pointer constraints.
2019-11-13backend/wayland: add support for relative-pointer-unstable-v1Simon Ser
We just send relative motion events alongside absolute motion events. Compositors can figure out how absolute and relative events are related (e.g. whether they have been triggered by the same logical event) with the frame event.
2019-11-11Introduce wlr_renderer_get_eglDrew DeVault
2019-11-08Skip assign when sub_x or sub_y is NULL in wlr_surface_surface_atAlynx Zhou
2019-11-07render/gles2: provide public API to access GL textureSimon Ser
Prior to this commit, compositors needed to render the texture to an intermediate off-screen buffer using wlr_renderer APIs if they wanted to use a custom rendering path (e.g. render to a 3D scene). A new wlr_gles2_texture_get_attribs exposes the GL texture target and ID so that compositors can render wlr_textures with their own shaders. An example of a compositor doing so is available at [1]. [1]: https://git.sr.ht/~sircmpwn/wxrc/tree/3db905b7842ac42cf1878876e647005b41f00a52/src/render.c#L227
2019-11-06render: remove EGL includes from wlr_texture.hSimon Ser
2019-11-06render/gles: Simplify textures a bitScott Anderson
We don't need our own enum for types. Instead we just use GL_TEXTURE_{2D,EXTERNAL_OES}, which already describes usage. Also fixes a situation where we were using GL_TEXTURE_2D in a situation we should not have. wl_drm buffers are always GL_TEXTURE_EXTERNAL_OES, no matter if they're RGB or any other format.
2019-11-05Introduce wlr_keyboard_groupBrian Ashworth
A wlr_keyboard_group allows for multiple keyboard devices to be combined into one logical keyboard. Each keyboard device can only be added to one keyboard group. This helps with the situation where one physical keyboard is exposed as multiple keyboard devices. It is up to the compositors on how they group keyboards together, if at all. Since a wlr_keyboard_group is one logical keyboard, the keys are a set. This means that if a key is pressed on multiple keyboard devices, the key event will only be emitted once, but the internal state will count the number of devices that the key is pressed on. Likewise, the key release will not be emitted until the key is released from all devices. If the compositor wants access to which keys are pressed and released on each keyboard device, the events for those devices can be listened to, as they currently are, in addition to the group keyboard's events. Also, all keyboard devices in the group must share the same keymap. If the keymap's differ, the keyboard device will not be able to be added to the group. Once in the group, if the keymap or effective layout for one keyboard device changes, it will be synced to all keyboard devices in the group. The repeat info and keyboard modifiers are also synced
2019-11-03session/logind: Clean up add_signal_matchesScott Anderson
The original signal matching was using the old interface before sd_bus_match_signal was added, which the new code uses. Change them all to use it now.
2019-11-03session/logind: support CanGraphical propertyRonan Pigott
2019-11-02backend/x11: Give X11 a real rendering loopScott Anderson
Makes use of the present extension to get notified of vsync, and not require any stupid timer hacks. Also make use of the present version of ConfigureNotify, because why not?
2019-10-27Fix heap-use-after-free in wlr_send_tablet_v2_tablet_pad_leaveGyörgy Kurucz
See swaywm/sway#4660
2019-10-27output-management-v1: add assertion as a safety netSimon Ser
Makes it easier to figure out when the compositor submits an invalid output state. References: https://github.com/swaywm/sway/pull/4673
2019-10-27backend/drm: add support for custom modesSimon Ser
Use the CVT algorithm to create a drmModeModeInfo.
2019-10-23backend/drm: retry without modifiers for the primary planeSimon Ser
On some Intel cards using modifiers can fill the FIFO and prevent hotplugged outputs from being properly enabled. Add a fallback without modifiers. Fixes: 2bdd1d0896cc ("backend/drm: use modifiers for our GBM buffers") References: https://github.com/swaywm/wlroots/issues/1840 Closes: https://github.com/swaywm/wlroots/issues/1852
2019-10-23render/egl: prevent use-after-free when destroying current surfaceSimon Ser