Age | Commit message (Collapse) | Author |
|
|
|
In the case that only one axis received an event, rotating the input can
cause the change to actually happen on the other axis, as far as clients
are concerned.
This commit updates the axes flags to be consistent post-rotation.
Fixes swaywm/sway#4776.
|
|
A client requesting frames in the ready callback may miss frames that
happen while it is waiting to receive the event or sending the request.
If that happens, the client will have an outdated frame for an
indefinite period. A new frame might not be scheduled for a very long
time.
With this change, clients will receive new frames immediately upon
request.
|
|
This commit doesn't fix any issue that I'm aware of, since sway
incidentally does not use these fields. Still, they exist, so they
should probably be filled in to prevent fun surprises in the future.
|
|
While trying out the tinywl code, I found that the resize mode was behaving
weirdly ... so I looked into code. Turns out the `begin_interactive` method
stores the cursor position plus the geo_box position; however,
`process_cursor_resize` wasn't taking this into account, causing windows to
jump down in size unexpectedly when resized and lose alignment with the cursor.
To fix this, I simply added a member to the `tinywl_server` struct that stores
the geo_box when the mouse enters grab mode, and I referenced that data in the
resize method. I considered polling for this data every time instead of storing
it in the server struct, but 1) since changes in this value are not relevant
and 2) it could potentially decrease performance (I don't know enough about
wlroots to know how much) I decided to just store it. I can change this if
desired.
|
|
This allows one to create a headless backend with an existing renderer.
|
|
|
|
|
|
It doesn't make sense to add DRM_FORMAT_INVALID to a format set. Adding
an assertion allows us to safely query the format set with
DRM_FORMAT_INVALID. See [1].
[1]: https://github.com/swaywm/wlroots/pull/2021#discussion_r385839668
|
|
|
|
|
|
Closes: https://github.com/swaywm/wlroots/issues/1963
|
|
When built as a subproject, this removes the need for the parent project
to know about the dependency variable name.
This requires Meson 0.54.0.
|
|
Otherwise, the cursor will briefly jump to (0, 0). This is particularly
noticeable in the referenced issue (the game osu!).
Refs swaywm/sway#3633
|
|
|
|
This speeds up shutdown significantly, and is in line with how Weston
does it.
|
|
|
|
|
|
This allows wlr_multi_for_each_backend to iterate on the backends in the
order where they have been added.
|
|
Check for a NULL keyboard_state.keyboard value in
seat_client_create_keyboard() before trying to use it, as is done in
other functions like seat_client_send_repeat_info(). Prevents a segfault
in certain situations on keyboard removal, as seen in the sway issue.
Closes: https://github.com/swaywm/sway/issues/5205
Closes: https://github.com/swaywm/wlroots/issues/2073
|
|
GCC is complaining about a maybe-uninitialized variable when doing a
release build. Even if that can't actually happen because all enum
values are handled, add an abort call to silence the warning.
|
|
If the buffer doesn't have a supported format/modifier, make the test
fail.
|
|
Instead of checking for buffer size compatibility in each backend,
centralize the check in wlr_output itself.
|
|
The scaling factor was being implicitly cast to an int.
Closes: https://github.com/swaywm/sway/issues/4927
|
|
Only expose linux-dmabuf extension if EGL_EXT_image_dmabuf_import_ext is
supported.
Closes: https://github.com/swaywm/wlroots/issues/2076
|
|
This allows us to hard-fail if the extension is advertised but we fail
to enable it.
|
|
Ensure these are set to the correct value.
|
|
wlr_egl_init is not allowed to mutate these attribs.
|
|
Most of the pending output state is not forwarded to the backend prior
to an output commit. For instance, wlr_output_set_mode just stashes the
mode without calling any wlr_output_impl function.
wlr_output_impl.commit is responsible for applying the pending mode.
However, there are exceptions to this rule. The first one is
wlr_output_attach_render. It won't go away before renderer v6 is
complete, because it needs to set the current EGL surface.
The second one is wlr_output_attach_buffer.
wlr_output_impl.attach_buffer is removed in [1].
When wlr_output_rollback is called, all pending state is supposed to be
cleared. This works for all the state except the two exceptions
mentionned above. To fix this, introduce wlr_output_impl.rollback.
Right now, the backend resets the current EGL surface. This prevents GL
commands from affecting the output after wlr_output_rollback.
This patch is required for FBO-based outputs to work properly. The
compositor might be using FBOs for its own purposes [2], having leftover
FBO state can have bad consequences.
[1]: https://github.com/swaywm/wlroots/pull/2097
[2]: https://github.com/swaywm/wlroots/pull/2063#issuecomment-597614312
|
|
This prevents GL commands to affect a previously current EGL surface
after a buffer swap.
|
|
Check that buffer can be scanned out in wlr_output_test instead of
wlr_output_attach_buffer. This allows the backend to have access to the
whole pending state when performing the check.
This brings the wlr_output API more in line with the KMS API.
This removes the need for wlr_output_attach_buffer to return a value,
and for wlr_output_impl.attach_buffer.
|
|
|
|
|
|
Consumers call wlr_buffer_lock. Once all consumers are done with the
buffer, only the producer should have a reference to the buffer. In this
case, we can release the buffer (and let the producer re-use it).
|
|
|
|
Closes: https://github.com/swaywm/wlroots/issues/2088
|
|
If someone want to use screencopy as is processing multiple screenshots - it could be hard to find this issue with shm.
|
|
The logind provider defaulted to systemd and in order to use elogind,
-Dlogin-provider=elogind was required. This adds 'auto' as a choice
for the login-provider option and sets it as default. Using 'auto',
the build will check for systemd first and if it's not found, try
to find and use elogind automatically.
|
|
This allows users of the library to handle or ignore the error as they
see fit.
|
|
This makes it easier for the user of this library to properly handle
failure of this function.
The signature of wlr_renderer_impl.init_wl_display was also modified to
allow for proper error propagation.
|
|
This fixes an assertion failure if a client tries to do this, e.g. by
creating multiple toplevel objects for the same surface. If the same
role data is set multiple times, this does not cause an error, which is
how cursors use this interface.
|
|
We don't actually need the keymap. We need to close the FD or we will
run out of FDs.
|
|
Closes: https://github.com/swaywm/sway/issues/4826
|
|
This is more correct according to the protocol and fixes issues with
clients that wait for an enter event before processing pointer events.
|
|
This corrects an oversight made in 3f617631cb68c0e90a755b86f9c241caf0080f9a
|
|
This is more correct according to the protocol and fixes issues with
clients that wait for an enter event before processing key events
|
|
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
|
|
Add a comment to not forget why this call is necessary.
References: https://github.com/swaywm/wlroots/pull/2053
|
|
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
|
|
|