summaryrefslogtreecommitdiff
path: root/gtk/gtkpaned.c
diff options
context:
space:
mode:
authorFederico Mena Quintero <federico@nuclecu.unam.mx>1998-11-13 23:10:53 +0000
committerArturo Espinosa <unammx@src.gnome.org>1998-11-13 23:10:53 +0000
commit3552f4bbf8a62827d2dc2b93b856dba2acdda745 (patch)
tree0a6e700d0975f07f37701559feafa94813a7b04b /gtk/gtkpaned.c
parenta0ca2a7b0d905c7aa4eba64d213853afa3e87e33 (diff)
downloadgtk+-3552f4bbf8a62827d2dc2b93b856dba2acdda745.tar.gz
Destroy the cursor after we have assigned it to the window -- there is no
1998-11-13 Federico Mena Quintero <federico@nuclecu.unam.mx> * gtk/gtkpaned.c (gtk_paned_realize): Destroy the cursor after we have assigned it to the window -- there is no point in keeping it around. (gtk_paned_unrealize): No need to destroy the cursor here. * gtk/gtkpaned.h (struct _GtkPaned): Removed the cursor field, as it is not needed.
Diffstat (limited to 'gtk/gtkpaned.c')
-rw-r--r--gtk/gtkpaned.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/gtk/gtkpaned.c b/gtk/gtkpaned.c
index ae4da2a5e9..db5eac04ef 100644
--- a/gtk/gtkpaned.c
+++ b/gtk/gtkpaned.c
@@ -152,7 +152,7 @@ gtk_paned_realize (GtkWidget *widget)
attributes.y = paned->handle_ypos;
attributes.width = paned->handle_size;
attributes.height = paned->handle_size;
- attributes.cursor = paned->cursor = gdk_cursor_new (GDK_CROSS);
+ attributes.cursor = gdk_cursor_new (GDK_CROSS);
attributes.event_mask |= (GDK_BUTTON_PRESS_MASK |
GDK_BUTTON_RELEASE_MASK |
GDK_POINTER_MOTION_MASK |
@@ -162,6 +162,7 @@ gtk_paned_realize (GtkWidget *widget)
paned->handle = gdk_window_new (widget->window,
&attributes, attributes_mask);
gdk_window_set_user_data (paned->handle, paned);
+ gdk_cursor_destroy (attributes.cursor);
widget->style = gtk_style_attach (widget->style, widget->window);
@@ -228,8 +229,6 @@ gtk_paned_unrealize (GtkWidget *widget)
gdk_window_set_user_data (paned->handle, NULL);
gdk_window_destroy (paned->handle);
paned->handle = NULL;
- gdk_cursor_destroy (paned->cursor);
- paned->cursor = NULL;
}
if (GTK_WIDGET_CLASS (parent_class)->unrealize)