aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-06-30output: add backend docsSimon Ser
2020-06-30layer-shell: upgrade to v3, implement destructorIsaac Freund
2020-06-30wlr_drag: Destroy drag after releasing grabsKenny Levinsen
wlr_drag sets up keyboard, pointer and touch grabs, which block 'enter' events (and thus focus changes). For the compositor to be able to update focus (e.g. to focus the drop target) from the destroy handler, the grabs must be released before the destroy event is signalled.
2020-06-26xcursor: add xorg-x11 and cursors path to XCURSORPATHKirill Chibisov
This should match default XCURSORPATH, which is used by libwayland-cursor and other xcursor loading libraries more closely.
2020-06-25xdg-decoration: free old configure structsIsaac Freund
2020-06-25xdg-shell: handle serial wrapping overflowIsaac Freund
2020-06-25layer-shell: handle serial wrapping overflowIsaac Freund
2020-06-24render/gles2: use glGetAttribLocation instead of hardcoded indicesSimon Zeni
2020-06-20examples/pointer: fix wlr_renderer_end call orderSimon Ser
Calling wlr_renderer_end after wlr_output_commit would make an assertion fail.
2020-06-19backend/noop: add missing rollback_render output implSimon Ser
3c5dbfd97c77 ("output: make rollback_render mandatory") makes a no-op output init fail without this function.
2020-06-19output: fix dangling renderer context after wlr_output_preferred_read_formatSimon Ser
attach_render was called without un-setting the current rendering context afterwards. Closes: https://github.com/swaywm/wlroots/issues/2164
2020-06-19output: make rollback_render mandatorySimon Ser
If the output backend provides attach_render, assert it also provides a way to revert it via rollback_render.
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-18render/egl: print error nameSimon Ser
Allows for easier debugging.
2020-06-18surface: ignore viewport src rect on NULL bufferSimon Ser
According to the viewporter protocol: > If the wl_buffer is NULL, the surface has no content and therefore no size.
2020-06-18surface: don't unset width and height in finalizeRouven Czerwinski
During surface finalization we may not have received a new buffer, resetting width and height in this case is wrong since we display the old buffer in this case.
2020-06-17input/keyboard: send modifiers on first keyboard enterTudor Brindus
Will fix Firefox bug https://bugzilla.mozilla.org/show_bug.cgi?id=1643991. Fixes swaywm/sway#5462.
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-17render/gles2: use .x/.y instead of .s/.tSimon Ser
texcoord is a vector of coordinates, with the first member being the X axis value and the second member being the Y axis value. It makes more sense to use the accessors with the same names.
2020-06-16render: assert sane values for box functionsRouven Czerwinski
Width and height should always be > 0 for render functions which take a wlr_box. References https://github.com/swaywm/wlroots/issues/2281
2020-06-13screencopy: Use correct constant for y-inversionAndri Yngvason
2020-06-13backend: drm: Fix dmabuf resource leakAndri Yngvason
2020-06-11examples/fullscreen-shell: stop advertising linux-dmabuf unconditonallySimon Ser
Remove the wlr_linux_dmabuf_v1_create call. wlr_renderer_init_wl_display will take care of creating the linux-dmabuf global if the OpenGL implementation supports it.
2020-06-11examples/screencopy-dmabuf: call strncpy with maxlen - 1Simon Ser
The original code wasn't wrong since we were manually writing a null byte anyway, but this makes GCC happy. Closes: https://github.com/swaywm/wlroots/issues/2273
2020-06-10render/egl: explicit client extension handlingSimon Ser
Prior to this commit, wlr_egl_init seemed to assume the extension string queried via EGL_NO_DISPLAY was a subset of the extension string queried via an initialized display. This isn't correct. EGL_EXT_client_extensions [1] defines two types of extensions: client extensions and display extensions. The set of supported client and display extensions are disjoint (ie. an extension is either a client or a display extension, not both). Client extensions are queried via EGL_NO_DISPLAY, display extensions are queried via an initialized display. Rename the variables to make this clear. Remove the misleading comment. Log both client and display extensions. [1]: https://www.khronos.org/registry/EGL/extensions/EXT/EGL_EXT_client_extensions.txt
2020-06-09output: document wlr_output_export_dmabufSimon Ser
2020-06-09buffer: document wlr_buffer_get_dmabuf DMA-BUF lifetimeSimon Ser
2020-06-08render: Fix blit_dmabuf() breakage due to API changeAndri Yngvason
2020-06-08examples: Add screencopy-dmabuf exampleAndri Yngvason
2020-06-08screencopy: Implement copying into linux-dmabufAndri Yngvason
2020-06-08protocol: screencopy: Extend to report linux-dmabuf capabilityAndri Yngvason
A new version of the protocol is required so that the client can discover which buffer types are supported by the compositor.
2020-06-08render: Add wlr_renderer_blit_dmabuf()Andri Yngvason
2020-06-08render: egl: Add utility functions for saving/restoring contextAndri Yngvason
2020-06-08backend/drm: fix stack overflow in dealloc_crtcSimon Ser
Call drm_crtc_commit directly instead of calling drm_connector_set_mode. This restores the previous behaviour where conn_enable was called [1]. [1]: https://github.com/swaywm/wlroots/blob/0c7c562482575cacaecadcd7913ef25aeb21711f/backend/drm/drm.c#L1093 Closes: https://github.com/swaywm/wlroots/issues/2253
2020-06-08contributing: add note about events that destroy objectsSimon Ser
2020-06-08contributing: resource destroy handlers need to cleanup pointersSimon Ser
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-03backend/drm: fix black screens when enabling outputSimon Ser
This patch fixes this failure: 01:57:16.642 [ERROR] [backend/drm/drm.c:360] Failed to page-flip output 'eDP-1': a page-flip is already pending 01:57:16.684 [ERROR] [backend/drm/drm.c:360] Failed to page-flip output 'eDP-1': a page-flip is already pending 01:57:16.684 [ERROR] [backend/drm/drm.c:732] Failed to initialize renderer on connector 'eDP-1': initial page-flip failed 01:57:16.684 [ERROR] [backend/drm/drm.c:805] Failed to initialize renderer for plane 01:57:16.684 [sway/config/output.c:423] Failed to commit output eDP-1 References: https://github.com/swaywm/sway/issues/5101
2020-06-02render: stop making EGL context current in wlr_egl_initSimon Ser
This leaves an EGL context current behind. wlr_gles2_renderer_create was assuming the EGL context was already current because of this (because it called a GL function right off the bat).