Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/intern
diff options
context:
space:
mode:
authorCampbell Barton <campbell@blender.org>2022-10-28 04:16:25 +0300
committerCampbell Barton <campbell@blender.org>2022-10-28 04:16:25 +0300
commit18e0f741c8194e4c87c58d874029c77c9a9f5ced (patch)
treea919493b113c158aa9c86cd1e63754d57b9a1d6f /intern
parentd447cf9704ae016d543a28977db6cc6066ed1fb1 (diff)
GHOST/Wayland: improve code-comments
Diffstat (limited to 'intern')
-rw-r--r--intern/ghost/intern/GHOST_SystemWayland.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/intern/ghost/intern/GHOST_SystemWayland.cpp b/intern/ghost/intern/GHOST_SystemWayland.cpp
index c4a98b672a4..eaf42bee683 100644
--- a/intern/ghost/intern/GHOST_SystemWayland.cpp
+++ b/intern/ghost/intern/GHOST_SystemWayland.cpp
@@ -786,8 +786,14 @@ struct GWL_Display {
struct zwp_primary_selection_device_manager_v1 *wp_primary_selection_device_manager = nullptr;
};
+/**
+ * Free the #GWL_Display and it's related members.
+ * \note This may run on a partially initialized struct, so it can't be assumed all mebers are set.
+ */
static void gwl_display_destroy(GWL_Display *display)
{
+ /* For typical WAYLAND use this will always be set.
+ * However when WAYLAND isn't running, this will early-exit and be null. */
if (display->wl_registry) {
wl_registry_destroy(display->wl_registry);
display->wl_registry = nullptr;
@@ -1037,7 +1043,7 @@ static void gwl_registry_entry_remove_all(GWL_Display *display)
* In practice this isn't a problem as so there are so few elements in `display->registry_entry`,
* so few use update functions and adding/removal at runtime is rarely called (plugging/unplugging)
* hardware for e.g. So while it's possible to store dependency links to avoid unnecessary
- * looping over data - so it ends up being a non issue.
+ * looping over data - it ends up being a non issue.
*/
static void gwl_registry_entry_update_all(GWL_Display *display, const int interface_slot_exclude)
{