[gtk+] paned: quietly handle missing cursors
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] paned: quietly handle missing cursors
- Date: Tue, 27 Sep 2016 18:56:13 +0000 (UTC)
commit 6181ff255251ce9cde231c6db8c04e4f4bb1d71b
Author: Matthias Clasen <mclasen redhat com>
Date: Tue Sep 27 14:55:13 2016 -0400
paned: quietly handle missing cursors
The row-/col-resize cursors should really be present, but if they
aren't we don't need to crash.
https://bugzilla.gnome.org/show_bug.cgi?id=771963
gtk/gtkpaned.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkpaned.c b/gtk/gtkpaned.c
index dbde5bd..8becebd 100644
--- a/gtk/gtkpaned.c
+++ b/gtk/gtkpaned.c
@@ -1689,6 +1689,7 @@ gtk_paned_realize (GtkWidget *widget)
GDK_ENTER_NOTIFY_MASK |
GDK_LEAVE_NOTIFY_MASK |
GDK_POINTER_MOTION_MASK);
+ attributes.cursor = NULL;
attributes_mask = GDK_WA_X | GDK_WA_Y;
if (gtk_widget_is_sensitive (widget))
{
@@ -1701,8 +1702,7 @@ gtk_paned_realize (GtkWidget *widget)
priv->handle = gdk_window_new (window,
&attributes, attributes_mask);
gtk_widget_register_window (widget, priv->handle);
- if (attributes_mask & GDK_WA_CURSOR)
- g_object_unref (attributes.cursor);
+ g_clear_object (&attributes.cursor);
priv->child1_window = gtk_paned_create_child_window (paned, priv->child1);
priv->child2_window = gtk_paned_create_child_window (paned, priv->child2);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]