aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-03-12output: add comment about needs_frame in wlr_output_schedule_frameSimon Ser
Add a comment to not forget why this call is necessary. References: https://github.com/swaywm/wlroots/pull/2053
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-09render/gles2: remove duplicated format listSimon Ser
2020-03-07util/log: improve time prefixSimon Ser
Log milliseconds. This is useful when debugging a rendering loop. Print the time relative to the compositor start-up.
2020-03-06output: don't send a needs_frame event if already sentSimon Ser
2020-03-06output: make wlr_output_schedule_frame set output->needs_frameSimon Ser
This way, wlr_output_schedule_frame will always be followed by a wlr_output_commit. This forces the compositor to render an extra frame before stopping the rendering loop. To test, run wleird's frame-callback [1], make sure it's the only visible client on the output and check the interval between frame events is the output's refresh period instead of zero. [1]: https://github.com/emersion/wleird/blob/master/frame-callback.c Closes: https://github.com/swaywm/wlroots/issues/2051
2020-03-06xwayland: remove underscore prefix from atom namesSimon Ser
Previously, some atoms had a leading underscore, others didn't. Be more consistent and never use a leading underscore (symbols with a leading underscore followed by an upper-case letter are reserved).
2020-03-06xwayland: remove duplicate _NET_WM_NAME entrySimon Ser
2020-03-06xwayland: use explicit indexes when initializing atom_mapSimon Ser
It's very easy to break the mapping between the atom_name enum and the atom_map array. Use explicit indexes to prevent issues.
2020-03-06backend/drm: add support for adaptive_sync_enabledSimon Ser
The vrr_capable and VRR_ENABLED properties are used.
2020-03-06backend/x11: add support for adaptive_sync_enabledSimon Ser
This sets the _VARIABLE_REFRESH window property [1]. [1]: https://gitlab.freedesktop.org/mesa/mesa/blob/0616b7ac90cf4f86bb409d34101e3a3cceac8cbe/src/vulkan/wsi/wsi_common_x11.c#L1374
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-04xcursor: also look for cursor themes under ${datadir}/icons by defaultJan Beich
Same as https://gitlab.freedesktop.org/wayland/wayland/commit/dd8891be36ec
2020-03-04backend/wayland: fix seat caps handlingSimon Ser
Previously, each time a wl_seat.capabilities event was received the Wayland backend created new input devices. It now only does so the first time. Input devices are now destroyed when the cap is removed. Closes: https://github.com/swaywm/sway/issues/5055
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-03-04backend/wayland: rename wl_seat.c to seat.cSimon Ser
I never got why we have a wl_ prefix here.
2020-02-27wlr_output_power_management_v1: Init output_power->linkGuido Günther
This makes sure the `wl_list_remove(&output_power->link)` in `output_power_destroy()` does not crash even when the output_power never got added to a list. This can e.g. happen in the `mgmt->output == output` error path of `output_power_manager_get_output_power`.
2020-02-26xdg-shell: fix popups rendered outside of the screenAleksei Bavshin
Leave positioner inverted on the individual axis if it's no longer constrained. Otherwise constraint adjustment like `slide_x & flip_y` could render popup outside of the screen when both axes are constrained. Fixes Alexays/Waybar#532
2020-02-20idle-inhibit: Style and naming improvementsMichael Weiser
Port back style and naming improvements suggested in https://github.com/swaywm/wlroots/pull/2026 for keyboard-shortcuts-inhibit. These are all internal to the implementation and therefore unproblematic. Also, retrieve the inhibitor resource version from the manager resource instead of setting it statically. Signed-off-by: Michael Weiser <michael.weiser@gmx.de>
2020-02-20keyboard-shortcuts-inhibit: Add client exampleMichael Weiser
Again, copy'n'search'n'replace the idle inhibit example to become a simple keyboard shortcuts inhibit example, adding the active and inactive events. Getting the initial inhibitor needs to be done later than for idle inhibit to avoid an error "xdg_surface has never been configured". Signed-off-by: Michael Weiser <michael.weiser@gmx.de>
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-20examples: add output-power-management example clientGuido Günther
2020-02-20Implement wlr-output-power-management-v1Guido Günther
Co-authored-by: Simon Ser <contact@emersion.fr>
2020-02-20Add wlr-output-power-managementGuido Günther
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-19xwayland: ignore pointer focus changesSimon Ser
This reflects what i3 does [1]. [1]: https://github.com/i3/i3/blob/b3faf9fca9254679a4715486a4de80ebaee70410/src/handlers.c#L1076 Fixes: c067fbc010da ("xwm: allow applications to change focus between their own surfaces") Closes: https://github.com/swaywm/sway/issues/4926
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-18meson.build: update wayland requirement to 1.18Brian Ashworth
This updates the version requirement for wayland-server to 1.18, which is needed for wl_global_remove and wl_global_set_user_data
2020-02-17output: fix output transform compositionsManuel Stoeckl
This change ensures that wlr_output_transform_compose correctly composes transforms when the first transform includes a rotation and the second transform includes a flip.
2020-02-17Fix output rotation directionManuel Stoeckl
The Wayland protocol specifies output transform rotations to be counterclockwise and applied to the surface. Previously, wlroots copied Weston and incorrectly made rotations act clockwise on surfaces. This commit fixes that. This change will break compositors which expect transform rotations to be clockwise, and the rare applications that make use of surface transforms.
2020-02-17seat: don't destroy global immediatelySimon Ser
2020-02-17output: don't destroy global immediatelySimon Ser
Closes: https://github.com/swaywm/sway/issues/3625
2020-02-17util: add wlr_output_destroy_safeSimon Ser
This adds a generic helper to destory transient globals. See [1]. This patch depends on [2] and [3]. [1]: https://gitlab.freedesktop.org/wayland/wayland/issues/10 [2]: https://gitlab.freedesktop.org/wayland/wayland/merge_requests/28 [3]: https://gitlab.freedesktop.org/wayland/wayland/merge_requests/30
2020-02-17backend/session: allow GPU enumeration on FreeBSDJan Beich
https://github.com/FreeBSDDesktop/libudev-devd/commit/f11ee5b418c740ba6fd4c946ab10b0d89702e4d0
2020-02-10virtual-pointer: Add request for mapping to specific outputAndri Yngvason
2020-02-08examples: Fix compositor-examplesScott Anderson
Due to the way the wlr_output API was changed, these examples would never get a frame event to start the rendering loop. We now commit the outputs to start it.
2020-02-04meson: fix wayland-server minimum required versionSimon Ser
Having 1.16 results in the following error when running the compositor: 2019-04-27 17:30:50 - [wayland] wl_global_create: implemented version for 'wl_seat' higher than interface version (7 > 6) 2019-04-27 17:30:50 - [sway/input/seat.c:428] seat_create:could not allocate seat We require wayland-server >= 1.17 for wl_seat version 7. Fixes: a671fc51d25c ("Advertise wl_seat version 7") Fixes: a656e486f4a6 ("seat: fallback to v6 if libwayland 1.17 isn't available")
2020-01-28Declare wlr_seat globals as externJan Staněk
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-24backend/drm: remove overzealous finish_drm_surfaceRouven Czerwinski
The previous PR was overzealous in adding a finish_drm_surface call which was also done by the caller. Remove the call and also move the comment to the correct code location.
2020-01-24backend/drm: add env variable to disable modifiersRouven Czerwinski
In some cases modesets fail if the planes are initialized with modifiers. Since in this case possibly all planes need to reinitialized, which is not possible in the current wlroots design, add an environment variable for affected users.
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-24meson: Fix protocol includes for compositor examplesScott Anderson
2020-01-22Update version to 0.10.0Drew DeVault
2020-01-20Honor the `examples` meson settingJan Staněk
2020-01-17keyboard-group: two NULL keymaps are equalSimon Ser
Previously, creating a keyboard group without any keymap set would result in an error: Device keymap does not match keyboard group's
2020-01-17backend/drm: prevent outputs from being destroyed on commitSimon Ser
This would happen if initializing the renderer fails. Instead, we just mark the output as disabled. References: https://github.com/swaywm/sway/pull/4917
2020-01-14docs: document XDG_SESSION_IDSimon Ser
2020-01-14docs: establish one section per backendSimon Ser