Age | Commit message (Collapse) | Author |
|
oops
|
|
|
|
This commit changes the behavior of `new_*` signals to better match
their names (see https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3608).
wlr_xdg_shell.events.new_surface is now emitted when an xdg_surface is
created, and wlr_xdg_shell.events.new_{toplevel,popup} events are
introduced to get notified when an xdg_{toplevel,popup} is created.
Same applies to
`wlr_xdg_decoration_manager_v1.events.new_toplevel_decoration`. As a
result, wlr_xdg_surface.added and wlr_xdg_toplevel_decoration_v1.added
are removed, as we no longer need to track whether the corresponding
event was emitted.
Additionally, this commit changes the behavior of
wlr_xdg_surface.events.destroy: it is now emitted when the xdg_surface
is destroyed, as the name suggests.
wlr_xdg_{toplevel,popup}.events.destroy events are added to get
notified when an xdg_{toplevel,popup} is destroyed.
|
|
The output layout creates and destroys wl_output globals. We will
soon need the wl_display to do so.
|
|
|
|
|
|
"View" has been cargo-culted from Weston. In Weston, a view is not
even necessarily a toplevel -- it's just a way to draw an arbitrary
somewhere (a surface may be painted at multiple locations
simultaneously). The Weston concept has been misunderstood and then
was carried over to rootston, Sway, and tinywl.
Let's just use the official Wayland wording instead.
|
|
It can be e.g. a popup.
Closes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3754
|
|
|
|
Closes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3709
|
|
This assumption will become incorrect with future commits.
|
|
|
|
|
|
This changes the semantics of wlr_output_state. Instead of having
fields with uninitialized memory when missing from the committed
bitflag, all fields are always initialized (and maybe NULL/empty),
just like we do in wlr_surface_state. This reduces the chances of
footguns when reading a field, and removes the need to check for
the committed bitfield everywhere.
A new wlr_output_state_init() function takes care of initializing
the Pixman region.
|
|
This keeps track of the last set XCursor. If it hasn't changed,
skip the texture upload.
In the future, support for animated XCursors can be added.
Closes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3436
|
|
|
|
|
|
This makes -Db_sanatize=address happy.
|
|
This allows wlroots to support newer versions of the interface
without breaking the API.
|
|
This fixes e.g. accessing grabbed_view on a toplevel unmap if no
toplevel was grabbed before.
|
|
This renames it to wlr_scene_surface_try_from_buffer to be more clear
that this function can return NULL. This is inline with the rest of
wlroots[1].
[1] https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/3991
|
|
References: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/884
|
|
"left_ptr" is the X11 name, "default" is the cursor spec name.
|
|
|
|
Instead use the scene node position.
|
|
|
|
Up until now, wlr_backend_autocreate() created the wlr_session and
then stuffed it into struct wlr_multi_backend so that compositors
can grab it later.
This is an abuse of wlr_multi_backend and the wlr_backend API:
wlr_backend_get_session() and wlr_multi_backend.session only exist
to accomodate the needs of wlr_backend_autocreate(). What's more,
the DRM and libinput backends don't implement
wlr_backend_impl.get_session.
Instead, return the struct wlr_session to the compositor in the
wlr_backend_autocreate() call. wlr_backend_get_session() will be
removed in the next commit.
|
|
Fixes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3372
|
|
|
|
This union is unnecessary since the recent input device refactor and can
now be replaced by wlr_*_from_input_device() functions.
|
|
|
|
Co-authored-by: Isaac Freund <mail@isaacfreund.com>
|
|
|
|
|
|
With protocol additions such as [1], compositors currently have no
way to opt out of the version upgrade. The protocol upgrade will
always be backwards-compatible but may require new compositor
features.
The status quo doesn't make it possible to ship a protocol addition
without breaking the wlroots API. This will be an issue for API
stabilization [2].
To address this, let compositors provide a maximum version in the
function creating the global. We need to support all previous versions
of the interface anyways because of older clients.
This mechanism works the same way as Wayland clients passing a version
in wl_global.bind.
[1]: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/3514
[2]: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/1008
References: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3397
|
|
Running with WLR_BACKENDS=headless, there is no keyboard device.
Avoid crashes like so:
../tinywl/tinywl.c:136:2: runtime error: member access within null pointer of type 'struct wlr_keyboard'
../tinywl/tinywl.c:136:2: runtime error: member access within null pointer of type 'struct wlr_keyboard'
AddressSanitizer:DEADLYSIGNAL
=================================================================
==331107==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000120 (pc 0x556ed03e4e99 bp 0x7ffce834bc10 sp 0x7ffce834bbb0 T0)
==331107==The signal is caused by a READ memory access.
==331107==Hint: address points to the zero page.
#0 0x556ed03e4e99 in focus_view ../tinywl/tinywl.c:136
#1 0x556ed03eb3be in xdg_toplevel_map ../tinywl/tinywl.c:603
#2 0x7f75d6f768db in wlr_signal_emit_safe ../util/signal.c:29
#3 0x7f75d6e9cac7 in xdg_surface_role_commit ../types/xdg_shell/wlr_xdg_surface.c:315
#4 0x7f75d6eb6944 in surface_commit_state ../types/wlr_compositor.c:466
#5 0x7f75d6eb7b02 in surface_handle_commit ../types/wlr_compositor.c:523
#6 0x7f75d5714d49 (/usr/lib/libffi.so.8+0x6d49)
#7 0x7f75d5714266 (/usr/lib/libffi.so.8+0x6266)
#8 0x7f75d68cb322 (/usr/lib/libwayland-server.so.0+0xd322)
#9 0x7f75d68c65cb (/usr/lib/libwayland-server.so.0+0x85cb)
#10 0x7f75d68c91c9 in wl_event_loop_dispatch (/usr/lib/libwayland-server.so.0+0xb1c9)
#11 0x7f75d68c6d36 in wl_display_run (/usr/lib/libwayland-server.so.0+0x8d36)
#12 0x556ed03eef55 in main ../tinywl/tinywl.c:905
#13 0x7f75d5d2330f in __libc_start_call_main (/usr/lib/libc.so.6+0x2d30f)
#14 0x7f75d5d233c0 in __libc_start_main@GLIBC_2.2.5 (/usr/lib/libc.so.6+0x2d3c0)
#15 0x556ed03e46e4 in _start (/home/simon/src/wlroots/build/tinywl/tinywl+0x136e4)
|
|
Add destroy event processing.
Fixes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3416
|
|
|
|
Signed-off-by: Leonardo Hernández Hernández <leohdz172@protonmail.com>
|
|
|
|
|
|
valgrind complains on a use-before-init for the cursor mode.
|
|
|
|
With this commit, `wlr_xdg_toplevel_*()` functions now expect
a `wlr_xdg_toplevel` instead of a `wlr_xdg_surface`.
|
|
Currently this check is too strict and denies the move/resize request
if a subsurface of the client has pointer focus.
|
|
|
|
This doesn't work if scene outputs are not used as the primary output of
scene surfaces will always be NULL.
Therefore, take a wlr_scene_output instead of separate wlr_scene and
wlr_output arguments and rename the function to
wlr_scene_output_send_frame_done().
The actual behavior of the function is unchanged.
|
|
|
|
When using `meson --buildtype=release`, `-Wextra -Werror` is passed.
This includes `-Werror=maybe-uninitialized`, which complains about
the instances fixed in this commit.
|
|
|