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:
@ -992,15 +992,14 @@ gdk_window_impl_wayland_beep (GdkWindow *window)
|
||||
static void
|
||||
gdk_window_impl_wayland_finalize (GObject *object)
|
||||
{
|
||||
GdkWindow *window = GDK_WINDOW (object);
|
||||
GdkWindowImplWayland *impl;
|
||||
|
||||
g_return_if_fail (GDK_IS_WINDOW_IMPL_WAYLAND (object));
|
||||
|
||||
impl = GDK_WINDOW_IMPL_WAYLAND (object);
|
||||
|
||||
if (gdk_wayland_window_is_exported (window))
|
||||
gdk_wayland_window_unexport_handle (window);
|
||||
if (gdk_wayland_window_is_exported (impl->wrapper))
|
||||
gdk_wayland_window_unexport_handle (impl->wrapper);
|
||||
|
||||
g_free (impl->title);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user