Re: emit_event warning in GnomeCanvas



Darin Adler <darin bentspoon com> writes:
> When I click on the background of the icon view in Nautilus, I get a warning
> from emit_event. The warning is a bit cryptic because it just says
> "emit_event is about to return FALSE". I think it has something to do with
> canvas grab, but I don't know what Nautilus is doing wrong to cause the
> warning to be triggered.
> 
> The big problem is that Nautilus runs in a mode where warnings drop into the
> debugger, and this causes me to drop into the debugger with the pointer
> grabbed. Then I have to clobber X with Ctrl-Alt-Backspace.
> 
> Can someone help me fix the problem that causes the warning and the wording
> of the warning?
> 

It looks to me like the warning means "Canvas is broken internally
because it tried to emit an event on a non-grabbed item while an item
was grabbed."

On a quick glance, anytime canvas->need_repick is set to TRUE while
you have a grab, pick_current_item() will mess up canvas->current_item
so that events start going to the wrong place. I don't know the right
fix - maybe pick_current_item() needs to enforce some invariants about
only picking items that are children of the grab item? Looking at the
stable branch might be enlightening.

Another bug I noticed while in there is that calling grab_focus() on
an already-focused item causes a focus_out/focus_in pair to be
emitted, should probably short-circuit that.

Havoc



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