gdk/wayland: Fix gdk_window_impl_wayland_finalize() warnings
On Wayland, opening and closing a `GdkDisplay` generates a coupe of warnings at runtime: ``` GLib-GObject-WARNING **: invalid cast from 'GdkWindowImplWayland' to 'GdkWindow' GLib-GObject-WARNING **: invalid cast from 'GdkWaylandWindow' to 'GdkWindowImplWayland' ``` This is from `gdk_window_impl_wayland_finalize()` which tries to cast the given GObject to a `GdkWindow` while it's a `GdkWindowImplWayland`. Use the correct type casting of objects to avoid the warnings.
This commit is contained in:
parent
43d7747df6
commit
c9601f1567
@ -992,15 +992,14 @@ gdk_window_impl_wayland_beep (GdkWindow *window)
|
|||||||
static void
|
static void
|
||||||
gdk_window_impl_wayland_finalize (GObject *object)
|
gdk_window_impl_wayland_finalize (GObject *object)
|
||||||
{
|
{
|
||||||
GdkWindow *window = GDK_WINDOW (object);
|
|
||||||
GdkWindowImplWayland *impl;
|
GdkWindowImplWayland *impl;
|
||||||
|
|
||||||
g_return_if_fail (GDK_IS_WINDOW_IMPL_WAYLAND (object));
|
g_return_if_fail (GDK_IS_WINDOW_IMPL_WAYLAND (object));
|
||||||
|
|
||||||
impl = GDK_WINDOW_IMPL_WAYLAND (object);
|
impl = GDK_WINDOW_IMPL_WAYLAND (object);
|
||||||
|
|
||||||
if (gdk_wayland_window_is_exported (window))
|
if (gdk_wayland_window_is_exported (impl->wrapper))
|
||||||
gdk_wayland_window_unexport_handle (window);
|
gdk_wayland_window_unexport_handle (impl->wrapper);
|
||||||
|
|
||||||
g_free (impl->title);
|
g_free (impl->title);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user