aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
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
2019-10-22backend/drm: track gbm_bo during direct scan-outSimon Ser
We need to destroy the gbm_bo we imported and drmModeRmFb. Closes: https://github.com/swaywm/sway/issues/4662
2019-10-22screencopy: Implement damage reportingAndri Yngvason
2019-10-22protocol/screencopy: Add damage reportingAndri Yngvason
2019-10-22output: Add commit sequence numberAndri Yngvason
This allows synchronisation between different instances of commit/precommit callbacks.
2019-10-19Add missing include required by mesa and libglvnd changeFerdinand Bachmann
eglext.h no longer inludes eglmesaext.h, include it within wlroots explicitly. Fixes #1862
2019-10-17protocol: sync layer-shell with upstreamSimon Ser
Fixes this warning: ../protocol/wlr-layer-shell-unstable-v1.xml:241: warning: since version not increasing
2019-10-16layer_shell: set layer of existing surfaceTimidger
2019-10-16render/gles2: don't unset the current EGL surface when destroying textureSimon Ser
When a texture is destroyed between wlr_egl_make_current and wlr_egl_swap_buffers, it resets the current EGL surface to NULL. This makes wlr_egl_swap_buffers fail. If the EGL context is already current, there's no need to reset it.
2019-10-16backend/wayland: add support for direct scan-outSimon Ser
Closes: https://github.com/swaywm/wlroots/issues/1830
2019-10-16output: add block_idle_frameIvan Molodetskikh
2019-10-16Add new define EGL_NO_X11 for newer mesa libraryDanilo Spinella
Define both MESA_EGL_NO_X11_HEADERS and EGL_NO_X11 for backward combatibility.
2019-10-16build: simplify by using disabler depsSimon Ser
2019-10-11wlr_box: properly calculate closest point for non-positive area boxesIlia Bozhinov
If box->width/height is <= 0, the box doesn't contain any points, and so there is no closest point. wlr_box_closest_point should return NAN in this case. In addition, we need to handle empty boxes in a few other output-layout-related places, because outputs can have size 0x0 when they are created or destroyed.
2019-10-11backend/drm: use modifiers for our GBM buffersSimon Ser
2019-10-11render/egl: support formats with zero modifiersSimon Ser