[Top][All Lists]

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

BUG [ 100250 ] highlight menu item sometimes fails

From: Fred Kiefer
Subject: BUG [ 100250 ] highlight menu item sometimes fails
Date: Sun, 03 Feb 2002 01:29:10 +0100

I had a deeper look into the problem behind the bug 100250 and found
that it is created by a view that is moved to another window, while the
view needs display. In that specific constellation the method [NSView
setNeedsDisplayInRect:] does not work correct. As the whole area of the
view is already invalid the new window (and the super views) is not
marked as needing display.
There are multiple ways to resolve this problem and I am not sure which
is the best. Currently I would prefer to flag the view when moving it to
a new superview first as not to need display and than as needing
display. That way the invalid area is first cleared and than everything
works as expected. This would require changes to the methods
[addSubview:], [replaceSubview:with:] and
Another way to do it would be to flag a view as not needing display in
the [removeFromSuperview:] and
[removeFromSuperviewWithoutNeedingDisplay:] methods. Or to try to handle
this case in [setNeedsDisplayInRect:], but this would need a lot of
extra checks.

There is another smaller problem here in the method [NSWindow
orderWindow:relativeTo:]. Here the sending of needs display calls from
the runloops to the window is only started when the window does not need
display. This seem to be the wrong way round.

Could anybody with more insight in this matter propose the correct
solution (And perhaps also submit it). I send much more time to find the
problem than I expected and now just want to get rid of it.


reply via email to

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