aboutsummaryrefslogtreecommitdiff
path: root/include
AgeCommit message (Collapse)Author
2020-09-10layer-shell: add for_each_popupIsaac Freund
This brings the layer-shell api in line with that of xdg-shell and avoids reimplementing this function in every compositor in order to render layer shell popups correctly.
2020-09-03Remove xdg-shell v6Drew DeVault
Ding dong the witch is dead Fixes #2381
2020-09-01Use fixed size integer typeValentin
This type is meant to be 4 bytes large as seen in _XcursorReadUInt which always reads 4 bytes. An unsigned int is often 4 bytes large but this isnt' guaranteed so it is cleaner to use the exact type we want.
2020-08-27output-power-management-v1: listen to output commitSimon Ser
2020-08-27output: introduce wlr_output_event_commitSimon Ser
This event contains a `committed` bitfield, which allows callers to know which output fields changed during the commit. This allows users to setup a single atomic commit listener, instead of setting up one listener for each event (mode, scale, transform, and so on). References: https://github.com/swaywm/wlroots/issues/2098
2020-08-27xdg-shell: split last-acked and current stateIsaac Freund
These states are distinct in the time period between the ack_configure and the next commit on the surface. Splitting these states avoids the following race for example: - client starts at 1000x1000 - wlr_xdg_toplevel_set_size 500x500 - size is different -> configure sent - client acks the configure - wlr_xdg_toplevel_set_size 1000x1000 - compare_xdg_toplevel_state returns true since there is no pending configure and the currently committed size is still 1000x1000 - no new configure is sent - client commits at the size it last acked, 500x500
2020-08-24session: Add libseat backendKenny Levinsen
2020-07-30xwayland: do not allow apps to change focus after wlroots requestIlia Bozhinov
2020-07-28render/gles2: remove gles2_procsSimon Ser
Move the global into wlr_gles2_renderer. This removes global state and allows us to have multiple renderers with different GL loaders.
2020-07-28render/gles2: make push/pop debug functions take a wlr_rendererSimon Ser
2020-07-28render/gles2: keep ref to wlr_gles2_renderer in wlr_gles2_textureSimon Ser
2020-07-28render/gles2: make wlr_gles2_texture_from_* privateSimon Ser
These functions are unused by compositors (see e.g. [1]) and prevent wlr_gles2_texture from accessing wlr_gles2_renderer state. This is an issue for proper teardown [2] and for accessing GLES2 extensions. [1]: https://github.com/swaywm/wlroots/pull/1962#issuecomment-569511830 [2]: https://github.com/swaywm/wlroots/pull/1962
2020-07-27xwm: Set _NET_WM_STATE_FOCUSED property for the focused surfaceScott Moreau
Certain clients require this property to be set for expected behavior. Most notably, steam client CSD maximize button no longer worked after unmaximizing once, unless the state was changed by another method. The state is unset whenever another surface gains focus.
2020-07-21Fix typosAntonin Décimo
2020-07-21xwm: add support for xwayland minimizeTobias Langendorf
2020-07-15input/pointer: add wlr_seat_pointer_wrapTudor Brindus
It allows a compositor to do things like skip motion events on pointer constraint unlock. References: https://github.com/swaywm/sway/pull/5431
2020-07-08input-method: implement keyboard grabsxdavidwu
2020-07-08virtual-keyboard: add wlr_input_device_get_virtual_keyboardxdavidwu
2020-07-07layer-shell: remove unused surface listIsaac Freund
This was rendered useless in 5cde359.
2020-07-03xwm: end transfers when the requestor is destroyedJohn Chadwick
This improves the failure cases when incremental transfers fail to complete successfully for one reason or another.
2020-06-30output: add backend docsSimon Ser
2020-06-24render/gles2: use glGetAttribLocation instead of hardcoded indicesSimon Zeni
2020-06-19output: rename impl->rollback to rollback_renderSimon Ser
The output backend API is now mostly state-less thanks to the atomic hooks (commit and test). There is one exception though: attach_render. This function makes the rendering context current. However sometimes the compositor might decide not to render after attach_render (e.g. when there's nothing new to render to the back buffer). Thus wlr_output_rollback has been introduced to revert the pending state. Because the output backend API is mostly state-less, the only thing wlr_output_impl.rollback needs to do is revert the current rendering context. Rename the function to rollback_render to make this clear. Add a check in the common wlr_output code to only call rollback_render when attach_buffer has been previously called. On the long term, we'll be able to remove attach_render and rollback_render together.
2020-06-17viewporter: new protocol implementationSimon Ser
Closes: https://github.com/swaywm/wlroots/issues/633
2020-06-17surface: introduce wlr_surface_get_buffer_source_boxSimon Ser
This helper allows compositors to retrieve the buffer source box in buffer-local coordinates.
2020-06-17surface: add wlr_surface_state.viewportSimon Ser
This field contains the viewport source and destination parameters. It's intended to be updated by a third-party protocol, for instance viewporter.
2020-06-17render: add wlr_render_subtexture_with_matrixSimon Ser
This renders only a subset of the texture, instead of the full texture.
2020-06-17util/region: add wlr_region_scale_xySimon Ser
2020-06-17box: add wlr_fboxSimon Ser
Same as wlr_box, but for floating-point numbers.
2020-06-09output: document wlr_output_export_dmabufSimon Ser
2020-06-09buffer: document wlr_buffer_get_dmabuf DMA-BUF lifetimeSimon Ser
2020-06-08screencopy: Implement copying into linux-dmabufAndri Yngvason
2020-06-08render: Add wlr_renderer_blit_dmabuf()Andri Yngvason
2020-06-08render: egl: Add utility functions for saving/restoring contextAndri Yngvason
2020-06-06render: choose DMA-BUF texture target via eglQueryDmaBufModifiersEXTSimon Ser
EGL_EXT_image_dma_buf_import_modifiers tells us whether we should use GL_TEXTURE_2D or GL_TEXTURE_EXTERNAL_OES. Using the right texture target can fix some failures and/or improve performance on some drivers. This does the same as a Weston commit [1]. [1]: https://gitlab.freedesktop.org/wayland/weston/commit/40c519a3e613 Closes: https://github.com/swaywm/wlroots/issues/2173
2020-06-06util/time: move `timespec_sub` to time utilitiesTudor Brindus
2020-06-06util/time: de-duplicate `timespec_to_msec`Tudor Brindus
2020-06-06util: fix and move `get_current_time_msec` into a util fileTudor Brindus
This commit makes `get_current_time_msec` correctly return milliseconds as opposed to microseconds. It also considers the value of `tv_sec`, so we don't lose occasionally go back in time by one second. Finally, the function is moved into `util/time.cc` so that it can be reused elsewhere without having to consider these pitfalls.
2020-06-05Allow keyboard and pointer grabs to hook clear_focus()Thomas Hebb
This is necessary for some grabs, which currently have no way of knowing when the pointer/keyboard focus has left a surface. For example, without this, a drag-and-drop grab can erroneously drop into a window that the cursor is no longer over. This is the plumbing needed to properly fix swaywm/sway#5220. The existing fix, swaywm/sway#5222, relies on every grab's `enter()` hook allowing a `NULL` surface. This is not guaranteed by the API and, in fact, is not the case for the xdg-shell popup grab and results in a crash when the cursor leaves a surface and does not immediately enter another one while a popup is open (#2161). This fix also adds an assertion to wlr_seat_pointer_notify_enter() that ensures it's never called with a `NULL` surface. This will make Sway crash much more until it fixes its usage of the API, so we should land this at the same time as a fix in Sway (which I haven't posted yet).
2020-06-05wlr_seat: Clarify wording of non-grab-respecting function commentsThomas Hebb
I found the previous wording a bit confusing when I first read it. Reword these comments to explicitly say that the grab-respecting variants should be used in most cases. This change has no functional effect.
2020-06-05wlr_seat: Declare functions in the same order for pointer, keyboard, and touchThomas Hebb
These three APIs are very similar to one another, but they all had slightly different function orderings. For consistency, always declare the non_`notify` functions first, then the `notify` functions, then `{start,end,has}_grab`. This change has no functional effect.
2020-06-01backend/drm: make adaptive_sync atomicSimon Ser
Stop using drmModeObjectSetProperty, set the property in the crtc_commit function instead.
2020-05-31wlr_keyboard_group: introduce enter and leaveBrian Ashworth
This introduces the enter and leave events for wlr_keyboard_group. The enter event is emitted when a keyboard is added to the group while a key is pressed that is not pressed by any other keyboard in the group. The data is a wl_array of the pressed key codes unique to the keyboard that should now be considered pressed. Similarly the leave event is emitted when a keyboard is removed from the group while at least one key is pressed that is not pressed by any other keyboard in the group. The data is a wl_array of the pressed key codes unique to the keyboard that should now be considered released. The purpose of these events are to allow the compositor to update its state to avoid corruption. Additionally, for the leave event, the focused surface may have been notified of a key press for some or all of the key codes and needs to be notified of a key release to avoid state corruption. These were previously emitted as normal key events, but they are not normal key events. There is no actual key press or release associated with the events. It's purely for state keeping purposes. Emitting them as separate events allows the compositor to handle them differently. Since these are purely for state keeping purposes and are not associated with an actual key being pressed or released, bindings should not be triggered as a result of these events.
2020-05-28seat: Create inert objects for missing capabilitiesKenny Levinsen
We should throw a protocol error if the relevant capability has never existed when get_(pointer|keyboard|touch) is called. Otherwise, it should succeed, even if the capability is not currently present. This follows the spec, and avoids possible races with the client when capabilities are lost. Closes: https://github.com/swaywm/wlroots/issues/2227
2020-05-27backend/drm: don't set cursor if off-screenSimon Ser
Closes: https://github.com/swaywm/wlroots/issues/2216
2020-05-26backend/drm: introduce pending and current CRTC stateSimon Ser
Previously, we only had the pending state (crtc->pending, crtc->mode and crtc->active). This causes issues when a commit fails: the pending state is left as-is, and the next commit may read stale data from it. This will also cause issues when implementing test-only commits: we need to rollback the pending CRTC state after a test-only commit. Introduce separate pending and current CRTC states. Properly update the current state after a commit.
2020-05-26backend/drm: nuke retry_pageflipSimon Ser
retry_pageflip is now dead code, since drm_connector_start_renderer isn't called anymore. It was previously called when enabling an output. The name "retry_pageflip" was a little confusing because the function retried a modeset and the timer wasn't set up while performing a simple page-flip. Let's just remove this altogether for now. We can discuss whether it's worth it to bring it back. Should we only do it on failed page-flips? Should we only do it on EBUSY?
2020-05-26backend/drm: make drm_connector_set_mode take a wlr_drm_connectorSimon Ser
Since this is an internal DRM backend function, there's no reason we need to take a generic wlr_output.
2020-05-26backend/drm: remove enable_drm_connectorSimon Ser
Merge enable_drm_connector into drm_connector_set_mode. This allows us to de-duplicate logic since enabling an output performs a modeset.
2020-05-19xwayland: add option to disable WMSimon Ser