mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-26 13:41:07 +00:00
wayland: port code to g_clear_pointer
This commit is contained in:
parent
66de8f33fb
commit
aa258fa17f
@ -697,11 +697,7 @@ gdk_wayland_display_finalize (GObject *object)
|
|||||||
g_free (display_wayland->cursor_theme_name);
|
g_free (display_wayland->cursor_theme_name);
|
||||||
xkb_context_unref (display_wayland->xkb_context);
|
xkb_context_unref (display_wayland->xkb_context);
|
||||||
|
|
||||||
if (display_wayland->cursor_theme)
|
g_clear_pointer (&display_wayland->cursor_theme, wl_cursor_theme_destroy);
|
||||||
{
|
|
||||||
wl_cursor_theme_destroy (display_wayland->cursor_theme);
|
|
||||||
display_wayland->cursor_theme = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
g_list_store_remove_all (display_wayland->monitors);
|
g_list_store_remove_all (display_wayland->monitors);
|
||||||
g_object_unref (display_wayland->monitors);
|
g_object_unref (display_wayland->monitors);
|
||||||
|
@ -2303,10 +2303,7 @@ gdk_wayland_toplevel_uninhibit_idle (GdkToplevel *toplevel)
|
|||||||
g_assert (impl->idle_inhibitor && impl->idle_inhibitor_refcount > 0);
|
g_assert (impl->idle_inhibitor && impl->idle_inhibitor_refcount > 0);
|
||||||
|
|
||||||
if (--impl->idle_inhibitor_refcount == 0)
|
if (--impl->idle_inhibitor_refcount == 0)
|
||||||
{
|
g_clear_pointer (&impl->idle_inhibitor, zwp_idle_inhibitor_v1_destroy);
|
||||||
zwp_idle_inhibitor_v1_destroy (impl->idle_inhibitor);
|
|
||||||
impl->idle_inhibitor = NULL;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
Loading…
Reference in New Issue
Block a user