gnustep-dev
[Top][All Lists]
Advanced

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

Re: Cause of flickering title in load/save dialogs


From: Adrian Robert
Subject: Re: Cause of flickering title in load/save dialogs
Date: Thu, 13 Jan 2005 19:39:31 -0500

On Jan 13, 2005, at 7:14 PM, Serg Stoyan wrote:

I've noticed and others have posted that the window title flickers for
load and save dialogs (NSOpenPanel and NSSavePanel).  I found this is
caused by a call to [theSession->window orderFrontRegardless] in
[NSApplication -runModalSession:], which itself is called repeatedly
in a loop in [NSApplication -runModalForWindow:], once call per mouse
movement event.  Commenting this line out fixes the problem and seems
to cause no ill effects (in limited testing).

I've tried it too. All works correct without annoying flickering.

There are a couple of other calls in runModalSession which seem
questionable:

1) calls to -makeKeyWindow or -makeMainWindow (why can't these be done
just once in -beginModalSessionForWindow: ?)

I've just looked into latest CVS and see that it already there...

The calls are currently in -runModalSession (unless there was a change in the last few hours). I thought maybe they should be in -beginModalSession:. Or, there is something wrong with the frequency at which -runModalSession is being called. But...

...I just read the Apple docs for these methods (should have done this before, sorry). It looks like it is correct for -runModalSession: to request the window to the front. But to avoid the flickering side effect (and tons of X traffic), there should probably be some kind of check that making the request is actually necessary (the window is not at front already). I'll look into this.





reply via email to

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