Hi Stephan,
Thanks for your quick reply, and your efforts as always.
I really appreciate it.
On Jun 24, 2009, at 12:57 AM, Stephan Maximilian Huber wrote:
> Tatsuhiro Nishioka schrieb:
>> Hi,
>
>> - _menubarShown must be true at the constructor since this method hides
>> menubar only if menubarShown is true.
>
> it must be false, because the menubar get hidden in the constructor.
Oops, I missed that part.
>> I didn't confirm if this is also true on Cocoa implementation
>> - _availRect.origin.{x,y} > _mainScreenBounds.origin.{x,y} will never be
>> true since mainscreen's rect is always equal to or bigger than available
>> rect.
>> - _availRect.size.{width,height} < _mainScreenBounds.size.{width,height}
>> doesn't make sense
>
> This code does make sense if you have attached more than one monitor to
> your computer. Your patch will not work in this situation, the
> menubar/dock get hidden if you move the window to another screen.
Got it. I'll test your new code with two monitors later.
>> - SetSystemUIMode(kUIModeNormal, 0) must be called only when
>> windowsCoveringMenubarArea = 0.
>> Otherwise menubar/dock show up again right after being hidden.
>
> Nice catch, I did introduce this bug when refactoring the code to be
> adaptable with the cocoa implementation. Sorry 'bout that.
>
>> By the way, should the menubar/dock be hidden when (window.x < availRect.x)
>> or (window.x + window.width > availRect.x + availRect.width)?
>> It seems weird to me that Menubar and Dock go hidden even a window does not
>> overlap any of these.
>
> I am not sure what you mean, the dock gets hidden only if the
> window-rect intersects the dock- or menubar-rect.
Well, let me excuse on this. I first fixed the "make sense-or-not" part, and
that broke the original intension.
The menubar always gets hidden when the side of a window goes off the screen
even its top/bottom doesn't
covers menubar. this is my bad. and that lead me to change the initial
_menuShown into true....
I think I must have fixed the "Nice catch" part first and then check others.
Sorry for making you confused.
> I've tested the implementation with two attached screens, arranged them
> in different ways.
>
> Can you try the attached DarwinUtis.mm if it will work for you?
great. and It works with a single window.
Best,
Tat
_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org