Comment 16 for bug 1168858

Revision history for this message
Marco Trevisan (TreviƱo) (3v1n0) wrote : Re: [Bug 1168858] Re: Nautilus window opens behind current window

2013/4/24 Cas <email address hidden>:
> >From my position the logic behind the changes just don't make sense and
> I am thinking of the bigger picture not just Deluge.
>
> I can open any file with xdg-open, with the associated application
> opening focused, file-roller, image viewer, firefox etc... So that begs
> the question why is Nautilus a special case and we have to jump through
> hoops to open a Nautilus window focused?

I see your point, and I also was thinking the same, but there's some
rationale over it and what we eventually want is that if you run a
program you should pass some platform-data to it, that in general
includes the timestamp of the event that triggered that action in
order to define if the newly opened window should or not befocused by
WM.

In general the WM always focuses new windows, but Nautilus is a
particular case because it stays always opened in background (to draw
the desktop) and so, when called, in order to be able to focus a new
window it needs to say to the WM when this request has been done.

This is not only a problem that affects Nautilus, btw. Also Empaty was
affected (I proposed a patch for it as well, as for the
indicator-messages), Rythmbox and more.
See bug lp:627195

FYI, the same behavior is applied by gnome-shell as well (to say that
it's not a compiz problem, but a feature).

> An application developer when using xdg-open should not have to worry
> about special cases involving Nautilus file manager to have the new
> window focused like every other application.

Well, in general it should not use xdg-open directly I think, but he
should use the APIs that the environment is providing to open files
and folders. And everybody should start thinking that if an action
could leads to opening a new window, then that should be properly
formed in order to have the WM to focus it.

> With 13.04 so close to release all the applications that use the 'open
> folder' feature will encounter this issue and users (inc devs?) will be
> irate but you have not addressed this concern?

I see the point, and as said, I've put all my efforts to fix this
properly, but not WM or Nautilus side, but Application side (that is
where it must fixed).
Standard has changed since long time, and developers should sync with it.