gnokii-users
[Top][All Lists]
Advanced

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

xgnokii_netmon.c crashes in ExposeDisplay()


From: Daniele Forsi
Subject: xgnokii_netmon.c crashes in ExposeDisplay()
Date: Sat, 29 Apr 2006 14:45:18 +0200
User-agent: Mozilla Thunderbird 1.5 (X11/20051201)

When I open the Net Monitor window, xgnokii crashes after a couple of seconds and I think that it is caused by and infinite loop triggered by the second call to gtk_widget_draw() in ExposeDisplay() (I got a 10000+ lines gdb backtrace and I put some printf() to confirm that ExposeDisplay() never exited).

Can anybody confirm that displayData.number and displayData.label get updated even without ExposeDisplay() ?
Maybe this is due to changes from gtk+1.2 and gtk+2.0

Removing ExposeDisplay() works for me:

Index: xgnokii/xgnokii_netmon.c
===================================================================
RCS file: /sources/gnokii/gnokii/xgnokii/xgnokii_netmon.c,v
retrieving revision 1.15
diff -u -p -1 -r1.15 xgnokii_netmon.c
--- xgnokii/xgnokii_netmon.c    15 Jan 2006 15:13:27 -0000      1.15
+++ xgnokii/xgnokii_netmon.c    29 Apr 2006 12:40:08 -0000
@@ -278,24 +278,2 @@ static void InitMainMenu(void)

-static inline gint ExposeDisplay(GtkWidget * widget, GdkEventExpose * event)
-{
-       GdkRectangle rec;
-       GtkRequisition r;
-
-       gtk_widget_size_request(displayData.number, &r);
-       rec.x = DISPLAY_X;
-       rec.y = DISPLAY_Y;
-       rec.width = r.width;
-       rec.height = r.height;
-       gtk_widget_draw(displayData.number, &rec);
-
-       gtk_widget_size_request(displayData.label, &r);
-       rec.x += 3;
-       rec.y += 12;
-       rec.width = r.width;
-       rec.height = r.height;
-       gtk_widget_draw(displayData.label, &rec);
-
-       return FALSE;
-}
-

@@ -365,5 +343,2 @@ void GUI_CreateNetmonWindow()

-       gtk_signal_connect_after(GTK_OBJECT(pixmap), "expose_event",
-                                (GtkSignalFunc) ExposeDisplay, NULL);
-
        gtk_fixed_put(GTK_FIXED(display), pixmap, 0, 0);

--
Daniele




reply via email to

[Prev in Thread] Current Thread [Next in Thread]