Commit Graph

14 Commits

Author SHA1 Message Date
Alexander Orzechowski 1b0694b794 treewide: Migrate from sizeof(struct) to sizeof(*pointer) where practical 2023-10-03 01:51:07 -04:00
Mark Bolhuis 9ab819684d types/wlr_xdg_output_v1: Fix wl_output.done bug.
If the client binds to version 3 of zxdg_output_v1 and version 1 of
wl_output no wl_output.done or zxdg_output_v1.done event is
emitted [1].

Also no wl_output.done event is emitted when version 2 or lower of
zxdg_output_v1 is bound to.

Add a version check to output_manager_handle_get_xdg_output so that no
wl_output.done event is emitted when using version 1 of wl_output and
version 2 or lower of zxdg_output_v1.

[1]: https://gitlab.freedesktop.org/wayland/wayland-protocols/-/issues/81
2022-08-19 14:22:23 +00:00
Alexander Orzechowski ef4baea0e2 Use wl_signal_emit_mutable 2022-08-18 07:16:16 -04:00
Isaac Freund 2c59435e82
xdg-output: remove dead code
wlroots current requires wayland-protocols 1.24, so this if is no longer
needed and hasn't been for a while.
2022-01-28 17:38:39 +01:00
Isaac Freund f6fe439718 xdg-output: destroy outputs before manager
Since output_destroy() calls wl_list_remove() on the output's link,
the manager must still be valid. This is the same bug fixed in bf926e3
but with a different interface.
2021-01-19 11:56:31 +01:00
Simon Ser 7516a98167 Gracefully handle inert wl_output resources
Closes: https://github.com/swaywm/wlroots/issues/2088
2020-03-29 20:57:28 +02:00
Simon Ser 1f799c1cbd xdg-output-v1: use wlr_output.description
Since [1], the xdg-output description is mutable. Listen to output
description changes and send the new output description when updated.

[1]: 048102f21a
2019-12-29 12:35:22 -05:00
Simon Ser 5cde35923c Simplify globals implementation by removing destructors
Some globals are static and it doesn't make sense to destroy them before
the wl_display. For instance, wl_compositor should be created before the
display is started and shouldn't be destroyed.

For these globals, we can simplify the code by removing the destructor
and stop keeping track of wl_resources (these will be destroyed with the
wl_display by libwayland).
2019-11-25 09:01:46 -05:00
Versus Void 2ecfc46b93 xdg-output: send wl_output.done after xdg_output created
xdg-output version 3 requires to send wl_output.done
"after all xdg_output properties have been sent when the object is created"
2019-09-17 15:30:20 +03:00
Simon Ser 6396710976 xdg-output: add support for xdg-output-unstable-v1 version 3
This adds support for xdg-output-unstable-v1 version 3, added in [1].

The xdg_output.done event is now deprecated and is replaced with
wl_output.done.

[1]: 962dd53537
2019-08-02 10:02:33 -04:00
Simon Ser d7ef3a1f38 xdg-output: schedule a wl_output.done event on update
Xwayland expects an xdg_output.done event to always be sent with a
wl_output.done event.
2019-04-27 10:02:21 -06:00
Ian Fan c41d01306d wlr_xdg_output_v1: move where name & description are sent 2019-01-22 22:58:52 +01:00
Brian Ashworth f3ff40a0eb wlr_xdg_output_v1: only send name/description once
The xdg-output protocol states that name and description should only be
sent once per output since they do not change.
2019-01-22 21:53:33 +01:00
emersion b3cb22c003 xdg-output: add _v1 suffix 2018-09-14 19:29:08 +02:00
Renamed from types/wlr_xdg_output.c (Browse further)