After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 166242 - Nautilus windows opened by using the 'Places' menu are not focused.
Nautilus windows opened by using the 'Places' menu are not focused.
Status: RESOLVED FIXED
Product: nautilus
Classification: Core
Component: general
0.x.x [obsolete]
Other Linux
: High normal
: ---
Assigned To: Nautilus Maintainers
Nautilus Maintainers
Depends on: 163046
Blocks: 149028
 
 
Reported: 2005-02-04 07:40 UTC by Dennis Cranston
Modified: 2005-02-15 15:06 UTC
See Also:
GNOME target: ---
GNOME version: 2.9/2.10


Attachments
Half baked patch to add startup notification support to nautilus as a launchee (11.17 KB, patch)
2005-02-14 00:56 UTC, Elijah Newren
none Details | Review
Patch that appears to be fully functional so far (21.74 KB, patch)
2005-02-14 04:20 UTC, Elijah Newren
none Details | Review

Description Dennis Cranston 2005-02-04 07:40:49 UTC
When I open a location from the 'Places' menu in the panel.  Nautilus opens a
window, but the window is not focused and is placed behind the other application
windows.
Comment 1 Elijah Newren 2005-02-04 16:30:15 UTC
There are two problems:

1) The relevant .desktop files do not contain "StartupNotify=true" (which is
   trivial to fix and one can easily do so to test for the other remaining
   problems)

2) Nautilus does not handle startup-notification for its own windows--this
   means that (a) the timestamp isn't getting forwarded along with the request
   to open the new window (which is why the new window appears behind the focus
   window), and (b) the startup-identification stuff isn't getting forwarded
   along with the request to open the new window (meaning that the instance of
   nautilus that opens the new window can't signal that the launch is over;
   this results in the busy cursor staying up for 15 seconds or so and an
   extra, spurious, task in the windowlist applet remaining for that same
   duration)

Bug 163046 is already open for the "StartupNotify=true" in .desktop files, so
let's keep this one open for the forwarding of startup-notification information.
 gnome-terminal could be used as an example of how to handle this (see
terminal.c and terminal-window.c, as well as bug 156413 for the timestamp half).

(See also bug 161322 and bug 162424 which are about related focus issues in
nautilus with startup-notification, though they are different bugs)
Comment 2 Elijah Newren 2005-02-14 00:56:44 UTC
Created attachment 37448 [details] [review]
Half baked patch to add startup notification support to nautilus as a launchee

This patch may be fairly ugly--I don't grasp bonobo (and I try to avoid it),
and I just blatantly copy&pasted code from gnome-terminal in one place without
doing much to make it fit in (and I believe part of the code I copied had in
turn been copied from startup-notification...)	Plus, it doesn't work when a
launcher is used to show a window that had already been created (i.e. it only
works when a new NautilusWindow is created).  But, it's what I have so far and
I thought I'd put it up.  Feedback welcome.
Comment 3 Elijah Newren 2005-02-14 04:20:25 UTC
Created attachment 37449 [details] [review]
Patch that appears to be fully functional so far

This version seems to work for all the cases I've thrown at it, both as far as
the busy cursor and timestamps (focusing) is concerned.

Watch out for the FIXME's, though.  ;-)
Comment 4 Elijah Newren 2005-02-14 05:02:05 UTC
(Don't forget to apply the patch in bug 163046 if you want to try this patch
out, because otherwise this patch won't do much for you...)
Comment 5 Dennis Cranston 2005-02-14 16:29:14 UTC
Elijah, thank you for tackling this problem.  I have been testing your patch,
and I have found a couple startup notification issues. 

1.  From the panel menu, select 'Places->Network Servers'.  Do not close the
'Network' window and select 'Network Servers' again.  The cursor will change to
the hour glass for about 30 seconds.

2.  In the Places menu, 'Home Folder' and 'Computer' always open on top.  But
'Desktop' and other bookmarks I create with the file-chooser can still open
behind other windows on the desktop.
Comment 6 Elijah Newren 2005-02-15 00:03:47 UTC
I sent a newer patch sent to nautilus-list that fixes the first issue you point
out (http://mail.gnome.org/archives/nautilus-list/2005-February/msg00063.html).

As for the second issue, I have no clue where the .desktop file is that launches
the 'Desktop' folder, but it appears that the problem is that window is being
launched without startup-notification.  I would assume the same for the others,
but I don't know my way around the file-chooser.  Could you give me some
baby-steps?  (It'd also help if you know of documentation/bugs/sections of code
that point out how bookmarks with the file-chooser have been implemented...)
Comment 7 Dennis Cranston 2005-02-15 01:52:52 UTC
Elijah, Regarding your question about opening bookmarks from the places menu, I
took a look at the panel's code.  It's handled in the file panel-menu-bar.c  See
fuction activate_uri().  The panel opens the bookmarks by calling
gnome_url_show_on_screen().
Comment 8 Elijah Newren 2005-02-15 02:59:15 UTC
It would make use of gnome_url_show...  *sigh*  I was hoping that gnome_url_show
wasn't that important.  Looks like it's causing all sorts of problems... 
Anyway, there's already a separate bug for that (bug 166722), so I'll close this
bug if the new patch I posted to nautilus-list today also gets accepted unless
anyone can find any other problems with it.

Thanks for all the testing and for tracking down the gnome_url_show stuff, Dennis.
Comment 9 Elijah Newren 2005-02-15 15:06:07 UTC
The new patch got committed as well, so I'll close this.  Hopefully bug 166722
can be fixed before 2.10...