discuss-gnustep
[Top][All Lists]
Advanced

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

Re: GWorkspace openFile & ImageViewer


From: Alexander Malmberg
Subject: Re: GWorkspace openFile & ImageViewer
Date: Wed, 09 Apr 2003 20:40:37 +0200

Richard Frith-Macdonald wrote:
[snip]

I've been looking at window ordering (with help from Jeff Teunissen, who
tested things on OPENSTEP) for a while now, and while I'm not ready to
commit anything yet, I do know that -gui has a couple of issues dealing
with this.

> Well, I don't think the windows should be shown if the app is not
> active ...

This is incorrect. According to the documentation, windows may be
ordered around at any time, and testing confirms this. If the window is
one that isn't displayed when the window isn't active, it won't actually
be displayed until the app is activated. Other windows should be ordered
in normally.

> so I think this is a bug in the handling of
> application:openFile: by the gui (combined with focus problems in the
> backend making the app inactive when it should be active) ... it should
> make the app active before opening the file rather than assuming that
> the delegates :openFile: method is going to do it.

This is also incorrect. -gui cannot assume that the application is of a
kind where opening a file should active it (for example, Terminal should
not activate when you open an .svcs file, but it should activate when
you open most other files). However, for NSDocument-based apps, I agree
that -gui should activate the app if it uses NSDocumentController to
open the file. (For the non-NSDocument case, testing confirms this.)

Anyway, I'm working on this, and hopefully it'll be done soon so I can
commit it. If people feel that keeping this workaround until then would
be good, I don't mind, but application developers need to be aware that
the behavior is wrong and will change (so if your app should activate
when opening a file, keep calling [NSApp activateIgnoringOtherApps:
YES];).

- Alexander Malmberg




reply via email to

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