Age | Commit message (Collapse) | Author |
|
This should match default XCURSORPATH, which is used by libwayland-cursor
and other xcursor loading libraries more closely.
|
|
|
|
|
|
|
|
|
|
Calling wlr_renderer_end after wlr_output_commit would make an
assertion fail.
|
|
3c5dbfd97c77 ("output: make rollback_render mandatory") makes a no-op
output init fail without this function.
|
|
attach_render was called without un-setting the current rendering
context afterwards.
Closes: https://github.com/swaywm/wlroots/issues/2164
|
|
If the output backend provides attach_render, assert it also provides a
way to revert it via rollback_render.
|
|
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.
|
|
Allows for easier debugging.
|
|
According to the viewporter protocol:
> If the wl_buffer is NULL, the surface has no content and therefore no size.
|
|
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.
|
|
Will fix Firefox bug
https://bugzilla.mozilla.org/show_bug.cgi?id=1643991.
Fixes swaywm/sway#5462.
|
|
Closes: https://github.com/swaywm/wlroots/issues/633
|
|
This helper allows compositors to retrieve the buffer source box in
buffer-local coordinates.
|
|
This field contains the viewport source and destination parameters. It's
intended to be updated by a third-party protocol, for instance
viewporter.
|
|
This renders only a subset of the texture, instead of the full texture.
|
|
|
|
Same as wlr_box, but for floating-point numbers.
|
|
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.
|
|
Width and height should always be > 0 for render functions which take a
wlr_box.
References https://github.com/swaywm/wlroots/issues/2281
|
|
|
|
|
|
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.
|
|
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
|
|
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
|
|
|
|
|
|
|
|
|
|
|
|
A new version of the protocol is required so that the client can
discover which buffer types are supported by the compositor.
|
|
|
|
|
|
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
|
|
|
|
|
|
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
|
|
|
|
|
|
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.
|
|
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).
|
|
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.
|
|
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.
|
|
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
|
|
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).
|
|
This was introduced in [1]. However after reverting that PR I still
can't reproduce the bug the PR aimed to fix [2].
Since there's no good explanation why we would need to swap buffers
before resizing, let's just revert the PR.
[1]: https://github.com/swaywm/wlroots/pull/1486
[2]: https://github.com/swaywm/wlroots/issues/1371
Closes: https://github.com/swaywm/wlroots/issues/1768
|
|
Fixes #2233.
|
|
When the mode, status or buffer hasn't changed, drm_connector_commit was
a no-op. Because of this individual changes to the gamma LUT or adaptive
sync status were ignored (if committed without a buffer).
Instead, perform a commit to apply the changes.
|