1998-04-15 Federico Mena Quintero <federico@nuclecu.unam.mx>

* gtrans.c (create_transparent_text_window): Destroy the cursor
	properly.
This commit is contained in:
Miguel de Icaza 1998-04-15 07:45:51 +00:00
parent 0a36428e84
commit 41eeb94d42
2 changed files with 8 additions and 5 deletions

View File

@ -1,3 +1,8 @@
1998-04-15 Federico Mena Quintero <federico@nuclecu.unam.mx>
* gtrans.c (create_transparent_text_window): Destroy the cursor
properly.
1998-04-14 Miguel de Icaza <miguel@nuclecu.unam.mx> 1998-04-14 Miguel de Icaza <miguel@nuclecu.unam.mx>
* gview.c (x_init_view): Initialize view->sadj. * gview.c (x_init_view): Initialize view->sadj.

View File

@ -327,12 +327,11 @@ create_transparent_text_window (char *file, char *text, int extra_events)
{ {
GtkWidget *window; GtkWidget *window;
GdkImlibImage *im; GdkImlibImage *im;
static GdkCursor *cursor; GdkCursor *cursor;
if (!g_file_exists (file)) if (!g_file_exists (file))
return NULL; return NULL;
im = image_cache_load_image (file); im = image_cache_load_image (file);
if (!im) if (!im)
return NULL; return NULL;
@ -352,10 +351,9 @@ create_transparent_text_window (char *file, char *text, int extra_events)
set_window_text (window, im, text); set_window_text (window, im, text);
if (!cursor) cursor = gdk_cursor_new (GDK_TOP_LEFT_ARROW);
cursor = gdk_cursor_new (GDK_TOP_LEFT_ARROW); /* FIXME: this is never freed */
gdk_window_set_cursor (window->window, cursor); gdk_window_set_cursor (window->window, cursor);
gdk_cursor_destroy (cursor);
return window; return window;
} }