aboutsummaryrefslogtreecommitdiff
path: root/include/wlr
AgeCommit message (Collapse)Author
2020-03-12output: replace wlr_output.damage with a damage eventSimon Ser
This patch disambiguates the needs_frame event by uncoupling it from damage. A new separate damage event is emitted when the backend damages the output (this happens e.g. VT is changed or software cursors are used). The event specifies the damaged region. The wlr_output.damage field is removed. wlr_output is no longer responsible for tracking its own damage, this is wlr_output_damage's job. This is a breaking change, but wlr_output_damage users shouldn't need an update. Bugs fixed: - Screen flashes on VT switch - Cursor damage issues on the X11 and headless backends Closes: https://github.com/swaywm/sway/issues/5086
2020-03-09buffer: remove unused wlr_client_buffer fieldsSimon Ser
Forgot to remove these, they are superseded by fields in wlr_buffer. Some functions were still using them. Fixes: 8afc1ed68cfa ("Introduce wlr_client_buffer") Closes: https://github.com/swaywm/sway/issues/5087
2020-03-06output: add adaptive_sync_enabled propertySimon Ser
2020-03-06Introduce wlr_client_bufferSimon Ser
Split out the client/resource handling out of wlr_buffer by introducing wlr_client_buffer. Make wlr_buffer an interface so that compositors can create their own wlr_buffers (e.g. backed by GBM, like glider [1]). [1]: https://github.com/emersion/glider/blob/c66847dd1cf8ae5e68666ce7cb3be41427b38dc7/include/gbm_allocator.h#L7
2020-03-04output: remove wlr_output_impl.schedule_frameSimon Ser
This function allowed backends to provide a custom function for frame scheduling. Before resuming the rendering loop, the DRM and Wayland backends would wait for vsync. There isn't a clear benefit of doing this. The only upside is that we get more stable timings: the delay between two repaints doesn't change too much and is close to a mutliple of the refresh rate. However this introduces latency, especially when a client misses a frame. For instance a fullscreen game missing vblank will need to wait more than a whole frame before being able to display new content. This worst case scenario happens as follows: - Client is still rendering its frame and cannot submit it in time - Deadline is reached - Compositor decides to stop the rendering loop since nothing changed on screen - Client finally manages to render its frame, submits it - Compositor calls wlr_output_schedule_frame - DRM backend waits for next vblank - The wlr_output frame event is fired, compositor draws new content on screen - On the second next vblank, the new content reaches the screen With this patch, the wlr_output frame event is fired immediately when the client submits its late frame. This change also makes it easier to support variable refresh rate, since VRR is all about being able to present too-late frames earlier. References: https://github.com/swaywm/wlroots/issues/1925
2020-02-20keyboard-shortcuts-inhibit: Implement the protocolMichael Weiser
The keyboard shortcuts inhibitor protocol is useful for remote desktop and virtualization software in order to request all keyboard events to be passed to it and (almost) none being resonded to by the compositor. This allows the session at the other end of the remote desktop connection or inside the virtual machine to be interacted with as usual (e.g. Alt+Tab to switch windows on the remote system instead of locally). Add the wayland protocol to the meson build files. Copy'n'search'n'replace the very similar idle inhibit protocol implementation. This already provides all the basic functionality: - creating and destroying inhibitors upon request by a client, - destruction in reaction to destruction of surfaces or displays, - a list of inhibitors to search through for existing ones as well as - a signal to be sent to the compositor upon registration of a new inhibitor. Beyond that we add the active and inactive events to be sent to the client and wire those to activate and deactivate functions for the compositor to call in confirmation of activation of a new inhibitor or (un-)suspending of an existing inhibitor e.g. in response to a special key combination entered by the user as suggested by the protocol. As mandated by the protocol, we check the existance of an inhibitor for a given surface and seat upon creation and return the error provided by the protocol for that purpose. Signed-off-by: Michael Weiser <michael.weiser@gmx.de> Closes: https://github.com/swaywm/wlroots/issues/1817
2020-02-20Implement wlr-output-power-management-v1Guido Günther
Co-authored-by: Simon Ser <contact@emersion.fr>
2020-02-20text_input_v3: Note features supported by the text fieldDorota Czaplejewicz
With this information, consumers can realize they will never retrieve some state, and adjust their strategy.
2020-02-19output-management: add current_configuration_dirtyIlia Bozhinov
Previously, if the current configuration contains an output X which is destroyed, its head is automatically removed. If the compositor submits the new configuration after X was removed, the current output configuration is incorrectly detected to be the same as the previous one, and no done event is sent. To prevent this, we can just keep track of whether the current configuration is dirty, i.e whether we have sent a done event for it.
2020-02-10virtual-pointer: Add request for mapping to specific outputAndri Yngvason
2020-01-24render: unconditionally disable implicit X11 includesSimon Ser
Even if the X11 backend or Xwayland is enabled, we don't rely on EGL/egl.h including Xlib headers.
2020-01-24build: replace version with soversionSimon Ser
This allows us to have a single number to update when doing a release. This drops WLR_VERSION_API_* definitions.
2020-01-10Drop RDP backendDrew DeVault
Users interested in remote access to wlroots compositors should use wayvnc: https://github.com/any1/wayvnc
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-31virtual-pointer: Add support for the wlr-virtual-pointer-unstable-v1Josef Gajdusek
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-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: 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-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-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-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-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-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-23Amend typosJason
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-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-11Introduce wlr_renderer_get_eglDrew DeVault
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-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-10-27backend/drm: add support for custom modesSimon Ser
Use the CVT algorithm to create a drmModeModeInfo.
2019-10-22screencopy: Implement damage reportingAndri Yngvason
2019-10-22output: Add commit sequence numberAndri Yngvason
This allows synchronisation between different instances of commit/precommit callbacks.
2019-10-16layer_shell: set layer of existing surfaceTimidger
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-08xwayland: Expose configure request maskScott Moreau
Without this information, compositors have no way to tell whether or not to consider the position information valid. Most notably, a compositor needs to know if it should pick a position for the surface or use the position sent in the configure request.
2019-09-26Clean up wayland backend tablet supportMarkus Ongyerth
Mostly address feedback from emersion on PR #1694 Remove const qualifier from char *name, to allow free() call
2019-09-19presentation_feedback: add the sampled stateIvan Molodetskikh
2019-09-14wlr_seat_touch: Destroy the touchpoint on client destroySebastian Krzyszkowiak
Since e26217c51e3a5e1d7dfc95a8a76299e056497981, touchpoints can outlive surfaces. This works fine as long as the client stays around, but fails horribly otherwise; therefore we have to make sure that touchpoints don't outlive their clients. Fixes #1788
2019-08-15wlr_xdg_toplevel: reparent on parent unmapBrian Ashworth
From the xdg-shell specification: If the parent is unmapped then its children are managed as though the parent of the now-unmapped parent has become the parent of this surface. If no parent exists for the now-unmapped parent then the children are managed as though they have no parent surface.
2019-08-12wlr_xdg_popup: grab touch events alongside pointer and keyboardSebastian Krzyszkowiak
Fixes #933
2019-08-11Add libinput-1.14 supportDrew DeVault
This libinput version adds a new tablet tool type.
2019-08-07Revert "output: atomic mode"Rouven Czerwinski
This reverts commit ee5f98ad49fed0439f3313ec685307831d1d1d05. This intoduced problems where outputs could not be turned off because they had flips pending.
2019-08-02output: atomic mode, enabled, scale and transformSimon Ser
This commit makes more output properties (mode, enabled, scale and transform) atomic. This means that they are double-buffered and only applied on commit. Compositors now need to call wlr_output_commit after setting any of those properties. Internally, backends still apply properties sequentially. The behaviour should be exactly the same as before. Future commits will update some backends to take advantage of the atomic interface. Some backends are non-atomic by design, e.g. the X11 backend or the legacy DRM backend. Updates: https://github.com/swaywm/wlroots/issues/1640
2019-08-01screencopy: send failed after output disconnectJason Francis
This prevents screencopy applications from hanging because a failed event never got sent when the output was disconnected or disabled after the call to buffer().
2019-07-27Remove all wayland-server.h includesSimon Ser
The documentation for wayland-server.h says: > Use of this header file is discouraged. Prefer including > wayland-server-core.h instead, which does not include the server protocol > header and as such only defines the library PI, excluding the deprecated API > below. Replacing wayland-server.h with wayland-server-core.h allows us to drop the WL_HIDE_DEPRECATED declaration.