EText BadCursor bug (Was Re: [Evolution] more bugs...)
- From: Damon Chaplin <damon helixcode com>
- To: Federico Mena Quintero <federico helixcode com>
- Cc: evolution helixcode com, Chris Lahey <clahey helixcode com>
- Subject: EText BadCursor bug (Was Re: [Evolution] more bugs...)
- Date: Sat, 23 Sep 2000 19:10:17 +0100
Federico Mena Quintero wrote:
There is still a pesky BadCursor bug that I'm trying to hunt down, but
it is driving me nuts.
I've figured this out. It goes like this:
o EText is being edited when something else grabs the focus.
o the canvas sends the EText a focus_out event.
o the EDayView text event signal handler is called first, and it sends
the updated iCalendar object to the server. The server sends the
obj_updated signal back and the EDayView destroys the current EText
and creates a new one.
o Now the EText focus_out class handler is run, but the EText is now
destroyed, and has destroyed its cursors. But it doesn't check for
this so it tries to set the cursor -> BadCursor
This patch seems to fix it. It sets the cursors to NULL after destroying
them, to avoid any possible BadCursor.
It also returns from the event class function if the EText item is
destroyed.
Damon
--- e-text.c.orig Sat Sep 23 17:03:30 2000
+++ e-text.c Sat Sep 23 19:07:18 2000
@@ -1545,7 +1545,9 @@
text->gc = NULL;
gdk_cursor_destroy (text->i_cursor);
+ text->i_cursor = NULL;
gdk_cursor_destroy (text->default_cursor);
+ text->default_cursor = NULL;
if (parent_class->unrealize)
(* parent_class->unrealize) (item);
@@ -2566,6 +2568,9 @@
ETextEventProcessorEvent e_tep_event;
gint return_val = 0;
+
+ if (GTK_OBJECT_DESTROYED (item))
+ return FALSE;
e_tep_event.type = event->type;
switch (event->type) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]