gtk+-1.0.4 / handlebox / BUG REPORT



handlebox news a cursor in it's init method and destroys it in it's
unrealize method - it should be consistent, otherwise you cannot
unrealize then rerealize the widget - which I am doing.

The following patch fixes it to free it in it's destroy method, this is
safer than only holding the cursor when the widget is realized - in case
someone tries to use it without checking - if you want to be more
efficient do it the other way ! :

rcsdiff -c gtkhandlebox.c
===================================================================
RCS file: RCS/gtkhandlebox.c,v
retrieving revision 1.1
diff -c -r1.1 gtkhandlebox.c
*** gtkhandlebox.c	1998/07/02 14:38:38	1.1
--- gtkhandlebox.c	1998/07/02 14:39:13
***************
*** 201,206 ****
--- 201,209 ----
  
    hb = GTK_HANDLE_BOX (object);
  
+   gdk_cursor_destroy (hb->fleur_cursor);
+   hb->fleur_cursor = NULL;
+ 
    if (GTK_OBJECT_CLASS (parent_class)->destroy)
      (* GTK_OBJECT_CLASS (parent_class)->destroy) (object);
  }
***************
*** 341,349 ****
    gdk_window_set_user_data (hb->float_window, NULL);
    gdk_window_destroy (hb->float_window);
    hb->float_window = NULL;
- 
-   gdk_cursor_destroy (hb->fleur_cursor);
-   hb->fleur_cursor = NULL;
  
    if (GTK_WIDGET_CLASS (parent_class)->unrealize)
      (* GTK_WIDGET_CLASS (parent_class)->unrealize) (widget);
--- 344,349 ----



Jules
begin:          vcard
fn:             Jules Gosnell
n:              Gosnell;Jules
email;internet: Julian.Gosnell@nomura.co.uk
x-mozilla-cpt:  ;0
x-mozilla-html: FALSE
version:        2.1
end:            vcard



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]