[275] in The GTK GIMP ToolKit mailing list archive
[gtk-list] Bugs in gdk_exit & gtk_exit ?
daemon@ATHENA.MIT.EDU (Alexandre Jaborska)
Wed Jun 4 06:44:14 1997
Date: Wed, 4 Jun 1997 11:49:06 +0200 (MET DST)
From: Alexandre Jaborska <ajaborsk@phare.univ-lille2.fr>
To: gtk-list@redhat.com
Resent-From: gtk-list@redhat.com
Reply-To: gtk-list@redhat.com
Hi !
I'm new in this list and I discovered GTK+ for some weeks.
I'm a Ph. D student and I'm working on a quite big software, designed to
be used in medical high dependency areas (Intensive Care Unit). This
project is compound of several modules (process). Some of these processes
needs a user interface. We used Motif to do this work ...
But Motif is definitively too Big and too slow, so we (I ?) decided to
switch to GTK+.
The result is MUCH faster (10 to 20 factor at launch) and smaller (50% to
70% RAM saved)
I think I've found a little bug in gdk_exit() and the same :-) in gtk_exit().
In fact, the bug seems to be that a atexit() function (ie a fonction
found in a atexit() call) call the exit() function ! (indirectly)
So, user atexit functions are called several times, witch is very bad in
my case !!!
the following patch seems to correct the problem :
[cut here]-------------------------------------------------------------------
diff -r -P -p gtk+/gdk/gdk.c gtk+alex/gdk/gdk.c
*** gtk+/gdk/gdk.c Sun Apr 27 06:00:45 1997
--- gtk+alex/gdk/gdk.c Fri May 30 22:16:49 1997
*************** static void
*** 1835,1841 ****
gdk_exit_func ()
{
if (initialized)
! gdk_exit (0);
}
/*
--- 1835,1849 ----
gdk_exit_func ()
{
if (initialized)
! {
! gdk_image_exit ();
! gdk_key_repeat_restore ();
!
! XCloseDisplay (gdk_display);
! initialized = 0;
! }
}
/*
diff -r -P -p gtk+/gtk/gtkmain.c gtk+alex/gtk/gtkmain.c
*** gtk+/gtk/gtkmain.c Sun Apr 27 06:00:37 1997
--- gtk+alex/gtk/gtkmain.c Fri May 30 22:18:44 1997
*************** static void
*** 560,566 ****
gtk_exit_func ()
{
if (initialized)
! gtk_exit (0);
}
static void
--- 560,573 ----
gtk_exit_func ()
{
if (initialized)
! {
! initialized = FALSE;
! gtk_preview_uninit ();
! }
}
static void
[cut here]---------------------------------------------------------------------
Does anyboby have the same problem ?
Greets,
Alex.
--
To unsubscribe: mail -s unsubscribe gtk-list-request@redhat.com < /dev/null