gnustep-dev
[Top][All Lists]
Advanced

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

Re: Patch: NSApplication -beginModalSessionForWindow:


From: Frederic Stark
Subject: Re: Patch: NSApplication -beginModalSessionForWindow:
Date: Wed, 26 Jan 2005 16:34:54 +0100
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.5) Gecko/20031007

Adrian Robert wrote:

> Hi all,
>
> Experimenting some more with the runModal... code in NSApplication,
> I noticed that OS X does not center the panel in
> -beginModalSessionForWindow: if it is already visible.  The attached
> patch does this, and documents this change and the related one to
> -runModalSession: last week (which also matches OS X behavior).
>
> The major user code visible effect is that panels that were already
> on-screen will not be moved to the center when beginning a modal
> session.  I wanted to check if anyone is relying on this behavior
> before committing..
>

I may have misread the path, but at first glance, it looks like it would not raise the window if it is already on screen... Seems weird.

Wouldn't the intend more precisely encoded in:

if ([theWindow isKindOfClass: [NSPanel class]])
{
    if ([theWindow isVisible] == NO)
        [theWindow center];

    [theWindow setLevel: NSModalPanelWindowLevel];
}

Cheers,

--fred






reply via email to

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