[gtk: 1/2] GdkSurface - Don't call unimplemented NULL set_startup_id() vfunc on Win32
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk: 1/2] GdkSurface - Don't call unimplemented NULL set_startup_id() vfunc on Win32
- Date: Tue, 7 May 2019 18:58:05 +0000 (UTC)
commit 2bd6661cd3416ff0a96f4a329ac6bde032f5e33b
Author: Sebastian Dröge <sebastian centricular com>
Date: Tue May 7 09:53:51 2019 +0300
GdkSurface - Don't call unimplemented NULL set_startup_id() vfunc on Win32
GdkSurface::set_startup_id() is NULL on Win32 and would cause a segfault
if called.
While the documentation of the main caller of set_startup_id(),
gtk_window_set_startup_id(), mentions that it's not implemented on
Windows it can still be automatically called via Glade and simply doing
nothing on Win32 is going to be less disruptive than a segfault.
gdk/gdksurface.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/gdk/gdksurface.c b/gdk/gdksurface.c
index 589a17dfa7..7e95e6a74c 100644
--- a/gdk/gdksurface.c
+++ b/gdk/gdksurface.c
@@ -4202,7 +4202,10 @@ void
gdk_surface_set_startup_id (GdkSurface *surface,
const gchar *startup_id)
{
- GDK_SURFACE_IMPL_GET_CLASS (surface->impl)->set_startup_id (surface, startup_id);
+ GdkSurfaceImplClass *klass = GDK_SURFACE_IMPL_GET_CLASS (surface->impl);
+
+ if (klass->set_startup_id)
+ klass->set_startup_id (surface, startup_id);
}
/**
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]