Commit Graph

11 Commits

Author SHA1 Message Date
Kirill Primak
2c33a1c2de util/addon: make wlr_addon_set_finish() safer
wl_list_for_each_safe() breaks if an item immediately after the current
one is removed, see
https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4358#note_2106260.
2023-10-08 11:06:09 +00:00
Simon Ser
7a9f8d8d6b Use struct initializers instead of memset()
This is a bit more type-safe.
2023-07-07 17:31:11 +02:00
Alexander Orzechowski
48a89179a3 addon: Remove extra newline from logging 2022-12-22 11:18:01 -05:00
Alexander Orzechowski
7a4fd9064c addon: Add more logging 2022-12-22 11:04:12 -05:00
Kirill Primak
884237e9af util/addon: ensure the set is empty after finish 2022-12-22 12:42:08 +03:00
Kenny Levinsen
bb0fd29252 addon: Allow NULL owner of addon
An owner is not always required or practical. Rather than have the user
set a bogus owner in these cases, allow the user to set a NULL owner.
2022-12-05 10:51:46 +01:00
Kirill Primak
4ac19e9f9c util/addon: avoid calling finish() twice
No functional change.
2022-05-23 11:11:38 +00:00
Simon Ser
6c350799b2 Zero-initialize structs in init functions
Ensures there is no field left to its previous undefined value after
calling an init function.
2022-04-28 10:09:50 +02:00
Simon Ser
54653b5d95 util/addon: fix public include
Everything in wlr/ is public and should be included via angle-bracket
include directives.
2022-04-26 09:43:10 +02:00
Kirill Primak
111d4eafd7 util/addon: find both by owner and impl
This allows to have multiple addons of different types with the same
owner.
2021-08-11 18:12:57 +02:00
Kirill Primak
a6a80850b7 util: add wlr_addon 2021-08-10 19:15:48 +02:00