[gtk/gtk-3-24: 1/2] GdkWindow - 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/gtk-3-24: 1/2] GdkWindow - Don't call unimplemented NULL set_startup_id() vfunc on Win32
- Date: Tue, 7 May 2019 15:02:16 +0000 (UTC)
commit 02d4fbe29e4278c202beaca93d64f1867ca79ac2
Author: Sebastian Dröge <sebastian centricular com>
Date: Tue May 7 09:59:10 2019 +0300
GdkWindow - Don't call unimplemented NULL set_startup_id() vfunc on Win32
GdkWindow::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/gdkwindow.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c
index 14164092d0..6601a32c9c 100644
--- a/gdk/gdkwindow.c
+++ b/gdk/gdkwindow.c
@@ -10500,7 +10500,10 @@ void
gdk_window_set_startup_id (GdkWindow *window,
const gchar *startup_id)
{
- GDK_WINDOW_IMPL_GET_CLASS (window->impl)->set_startup_id (window, startup_id);
+ GdkWindowImplClass *klass = GDK_WINDOW_IMPL_GET_CLASS (window->impl);
+
+ if (klass->set_startup_id)
+ klass->set_startup_id (window, startup_id);
}
/**
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]