Commit 18681dc6 authored by Jay Painter's avatar Jay Painter

Fixed a small memory leak in gtkpaned, and I changed the cursor to a

"I" beam for gtkentry. -Jay
parent f91efadd
Thu Jan 15 00:44:27 PST 1998 Jay Painter <jpaint@serv.net>
* gtk/gtkentry.[ch]: Change window cursor to "I"
* gtk/gtkpane.[ch]: Cleared up a tiny memory leak from not destroying the
cursor
Tue Jan 13 07:30:02 PST 1998 Jay Painter <jpaint@serv.net> Tue Jan 13 07:30:02 PST 1998 Jay Painter <jpaint@serv.net>
* gtk/gtkclist.c: minor updates * gtk/gtkclist.c: minor updates
* gtk/gtktext.c: you can type in it! It should also seg-fault *MUCH* less now, * gtk/gtktext.c: you can type in it! It should also seg-fault *MUCH* less now,
......
Thu Jan 15 00:44:27 PST 1998 Jay Painter <jpaint@serv.net>
* gtk/gtkentry.[ch]: Change window cursor to "I"
* gtk/gtkpane.[ch]: Cleared up a tiny memory leak from not destroying the
cursor
Tue Jan 13 07:30:02 PST 1998 Jay Painter <jpaint@serv.net> Tue Jan 13 07:30:02 PST 1998 Jay Painter <jpaint@serv.net>
* gtk/gtkclist.c: minor updates * gtk/gtkclist.c: minor updates
* gtk/gtktext.c: you can type in it! It should also seg-fault *MUCH* less now, * gtk/gtktext.c: you can type in it! It should also seg-fault *MUCH* less now,
......
Thu Jan 15 00:44:27 PST 1998 Jay Painter <jpaint@serv.net>
* gtk/gtkentry.[ch]: Change window cursor to "I"
* gtk/gtkpane.[ch]: Cleared up a tiny memory leak from not destroying the
cursor
Tue Jan 13 07:30:02 PST 1998 Jay Painter <jpaint@serv.net> Tue Jan 13 07:30:02 PST 1998 Jay Painter <jpaint@serv.net>
* gtk/gtkclist.c: minor updates * gtk/gtkclist.c: minor updates
* gtk/gtktext.c: you can type in it! It should also seg-fault *MUCH* less now, * gtk/gtktext.c: you can type in it! It should also seg-fault *MUCH* less now,
......
Thu Jan 15 00:44:27 PST 1998 Jay Painter <jpaint@serv.net>
* gtk/gtkentry.[ch]: Change window cursor to "I"
* gtk/gtkpane.[ch]: Cleared up a tiny memory leak from not destroying the
cursor
Tue Jan 13 07:30:02 PST 1998 Jay Painter <jpaint@serv.net> Tue Jan 13 07:30:02 PST 1998 Jay Painter <jpaint@serv.net>
* gtk/gtkclist.c: minor updates * gtk/gtkclist.c: minor updates
* gtk/gtktext.c: you can type in it! It should also seg-fault *MUCH* less now, * gtk/gtktext.c: you can type in it! It should also seg-fault *MUCH* less now,
......
Thu Jan 15 00:44:27 PST 1998 Jay Painter <jpaint@serv.net>
* gtk/gtkentry.[ch]: Change window cursor to "I"
* gtk/gtkpane.[ch]: Cleared up a tiny memory leak from not destroying the
cursor
Tue Jan 13 07:30:02 PST 1998 Jay Painter <jpaint@serv.net> Tue Jan 13 07:30:02 PST 1998 Jay Painter <jpaint@serv.net>
* gtk/gtkclist.c: minor updates * gtk/gtkclist.c: minor updates
* gtk/gtktext.c: you can type in it! It should also seg-fault *MUCH* less now, * gtk/gtktext.c: you can type in it! It should also seg-fault *MUCH* less now,
......
Thu Jan 15 00:44:27 PST 1998 Jay Painter <jpaint@serv.net>
* gtk/gtkentry.[ch]: Change window cursor to "I"
* gtk/gtkpane.[ch]: Cleared up a tiny memory leak from not destroying the
cursor
Tue Jan 13 07:30:02 PST 1998 Jay Painter <jpaint@serv.net> Tue Jan 13 07:30:02 PST 1998 Jay Painter <jpaint@serv.net>
* gtk/gtkclist.c: minor updates * gtk/gtkclist.c: minor updates
* gtk/gtktext.c: you can type in it! It should also seg-fault *MUCH* less now, * gtk/gtktext.c: you can type in it! It should also seg-fault *MUCH* less now,
......
Thu Jan 15 00:44:27 PST 1998 Jay Painter <jpaint@serv.net>
* gtk/gtkentry.[ch]: Change window cursor to "I"
* gtk/gtkpane.[ch]: Cleared up a tiny memory leak from not destroying the
cursor
Tue Jan 13 07:30:02 PST 1998 Jay Painter <jpaint@serv.net> Tue Jan 13 07:30:02 PST 1998 Jay Painter <jpaint@serv.net>
* gtk/gtkclist.c: minor updates * gtk/gtkclist.c: minor updates
* gtk/gtktext.c: you can type in it! It should also seg-fault *MUCH* less now, * gtk/gtktext.c: you can type in it! It should also seg-fault *MUCH* less now,
......
...@@ -591,6 +591,8 @@ gtk_entry_realize (GtkWidget *widget) ...@@ -591,6 +591,8 @@ gtk_entry_realize (GtkWidget *widget)
attributes.y = widget->style->klass->ythickness + INNER_BORDER; attributes.y = widget->style->klass->ythickness + INNER_BORDER;
attributes.width = widget->allocation.width - attributes.x * 2; attributes.width = widget->allocation.width - attributes.x * 2;
attributes.height = widget->allocation.height - attributes.y * 2; attributes.height = widget->allocation.height - attributes.y * 2;
attributes.cursor = entry->cursor = gdk_cursor_new (GDK_XTERM);
attributes_mask |= GDK_WA_CURSOR;
entry->text_area = gdk_window_new (widget->window, &attributes, attributes_mask); entry->text_area = gdk_window_new (widget->window, &attributes, attributes_mask);
gdk_window_set_user_data (entry->text_area, entry); gdk_window_set_user_data (entry->text_area, entry);
...@@ -688,6 +690,7 @@ gtk_entry_unrealize (GtkWidget *widget) ...@@ -688,6 +690,7 @@ gtk_entry_unrealize (GtkWidget *widget)
{ {
gdk_window_set_user_data (entry->text_area, NULL); gdk_window_set_user_data (entry->text_area, NULL);
gdk_window_destroy (entry->text_area); gdk_window_destroy (entry->text_area);
gdk_cursor_destroy (entry->cursor);
} }
if (widget->window) if (widget->window)
{ {
......
...@@ -42,6 +42,7 @@ struct _GtkEntry ...@@ -42,6 +42,7 @@ struct _GtkEntry
GdkWindow *text_area; GdkWindow *text_area;
GdkPixmap *backing_pixmap; GdkPixmap *backing_pixmap;
GdkCursor *cursor;
gchar *text; gchar *text;
guint16 text_size; guint16 text_size;
......
...@@ -156,7 +156,7 @@ gtk_paned_realize (GtkWidget *widget) ...@@ -156,7 +156,7 @@ gtk_paned_realize (GtkWidget *widget)
attributes.window_type = GDK_WINDOW_CHILD; attributes.window_type = GDK_WINDOW_CHILD;
attributes.visual = gtk_widget_get_visual (widget); attributes.visual = gtk_widget_get_visual (widget);
attributes.colormap = gtk_widget_get_colormap (widget); attributes.colormap = gtk_widget_get_colormap (widget);
attributes.cursor = gdk_cursor_new(GDK_CROSS); attributes.cursor = paned->cursor = gdk_cursor_new (GDK_CROSS);
attributes.event_mask = gtk_widget_get_events (widget); attributes.event_mask = gtk_widget_get_events (widget);
attributes.event_mask |= (GDK_EXPOSURE_MASK | attributes.event_mask |= (GDK_EXPOSURE_MASK |
GDK_BUTTON_PRESS_MASK | GDK_BUTTON_PRESS_MASK |
...@@ -245,10 +245,15 @@ gtk_paned_unrealize (GtkWidget *widget) ...@@ -245,10 +245,15 @@ gtk_paned_unrealize (GtkWidget *widget)
if (paned->xor_gc) if (paned->xor_gc)
gdk_gc_destroy (paned->xor_gc); gdk_gc_destroy (paned->xor_gc);
if (paned->handle) if (paned->handle)
gdk_window_destroy (paned->handle); {
gdk_window_destroy (paned->handle);
gdk_cursor_destroy (paned->cursor);
}
paned->handle = NULL; paned->handle = NULL;
paned->cursor = NULL;
widget->window = NULL; widget->window = NULL;
} }
......
...@@ -44,6 +44,7 @@ struct _GtkPaned ...@@ -44,6 +44,7 @@ struct _GtkPaned
GtkWidget *child2; GtkWidget *child2;
GdkWindow *handle; GdkWindow *handle;
GdkCursor *cursor;
GdkRectangle groove_rectangle; GdkRectangle groove_rectangle;
GdkGC *xor_gc; GdkGC *xor_gc;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment