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 273912 - Compose window not presented when launched from another application (focus stealing prevention)
Compose window not presented when launched from another application (focus st...
Status: RESOLVED FIXED
Product: evolution
Classification: Applications
Component: Shell
2.8.x (obsolete)
Other All
: High normal
: ---
Assigned To: Evolution Shell Maintainers Team
Evolution QA team
: 331314 357933 (view as bug list)
Depends on:
Blocks: 149028
 
 
Reported: 2005-03-21 09:30 UTC by Tommi Komulainen
Modified: 2008-11-19 14:43 UTC
See Also:
GNOME target: ---
GNOME version: 2.9/2.10



Description Tommi Komulainen 2005-03-21 09:30:39 UTC
Description of Problem:
In gnome 2.10 launching evolution as mailto: protocol handler when evo is
already running doesn't bring up the composer window properly. 

Steps to reproduce the problem:
1. Make sure evolution is the preferred mail reader in gnome
2. Run Epiphany/Galeon and select File/Send Link To...

Actual Results:
Seemingly nothing happens.  If you carefully look at the window list applet
(assuming you have one) you'll see evolution title changed to bold.

Expected Results:
Composer window is presented on top.

How often does this happen? 
Always with gnome 2.10 / metacity 2.10.0

Additional Information:
This is caused by the focus stealing prevention work, applications that
launch windows from an already existing instance need to handle the
situation more carefully.
Comment 1 Not Zed 2005-05-19 09:23:01 UTC
this is a window manager issue

on my window manager a new window pops up on the front of the current desktop

Comment 2 Tommi Komulainen 2005-05-19 18:05:38 UTC
Last time I checked metacity was the default window manager for GNOME.  It would
be rather weird for a GNOME desktop application to not play along with the desktop.
Comment 3 Elijah Newren 2005-05-19 19:02:13 UTC
I believe epiphany/galeon are using gnome_vfs_url_show, which doesn't take a
timestamp ("launch time") parameter, and thus launching evolution without
startup notification.  Since I believe Evolution is one of those applications
that makes any instance beyond the first just tell the first instance what to do
and then quit, this means that evolution (via gtk+) wil open a window with an
old timestamp (namely, the timestamp of the last time evolution was interacted
with, rather than the last epiphany/galeon interaction).

A few things need to be done:
1) Assuming I'm correct about Evolution being a single-instance-only app,
Evolution needs to forwarding the launch timestamp along with the other
information it sends from the new instance to the original instance.  (See
http://mail.gnome.org/archives/desktop-devel-list/2004-December/msg00306.html
for the details about all stuff apps need to do).  Gnome-terminal, nautilus,
epiphany, and galeon recently went through this (at varying levels, since some
had complete support for the prior startup-notification spec while others
didn't), so there are example patches out there.

2) Evolution should override the gtk+ launch time guess when it is launched
without startup-notification, because gtk+'s guess is bad for
forward-open-window-request-to-previous-instance applications.  Again,
gnome-terminal, nautilus, epiphany, and galeon have recently done this so there
are example patches out there.

3) gnome-vfs needs a gnome_vfs_open_url variant that takes a launch time
timestamp, and applications need to use it.  But that's a gnome-vfs issue; I'll
mention this specific case in bug 166197.
Comment 4 Not Zed 2005-08-22 04:16:42 UTC
like i said, my window manager just works.

sounds like gnome is broken.
Comment 5 Elijah Newren 2005-08-25 16:25:36 UTC
Ok, a quick explanation:  Having windows appear on top by default is good. 
Having windows always appear on top is buggy.  The same holds true if you
replace "on top" by "with focus" (for the majority use case anyway; I am aware
that some traditional Unix users like things like never-focus-new-windows
combined with either always-place-windows-on-top or never-place-windows-on-top
among many other things).

Basically, if the user launches an application (which I'll refer to as A) and
interacts with another application (which I'll refer to as B) before A appears
then A should not appear with focus nor should it appear on top (again, for the
majority use case).  The trick is that the window manager needs to know when A
was launched and when the focused window, B, was last used and compare those two
timestamps.

gtk+ handles most of the timestamp stuff for applications (including when a new
window is 'launched' (opened) from the application itself).  It can't however
know the time the user caused the application to be launched as that interaction
occurred in a different application.  Startup-notification usually provides gtk+
with the missing information but some apps (e.g. gnome-terminal, gedit,
nautilus, mozilla, epiphany, evolution, etc.) do stuff behind gtk+'s back by
forwarding an open-window request instead of opening a window themselves.  These
apps need to also forward the timestamp information so that gtk+ and the window
manager can do its job (also, most of the apps in that list now do so).

Steps 1 & 2 in comment 3 specify what need to be done here.  I'm willing to help
out with it when I get some free time, though it'd be nice if others could point
out the code for both the sending and receiving ends of the open-window
forwarding request stuff to save me a little time...
Comment 6 Elijah Newren 2006-03-03 02:53:59 UTC
*** Bug 331314 has been marked as a duplicate of this bug. ***
Comment 7 André Klapper 2006-09-27 13:57:21 UTC
*** Bug 357933 has been marked as a duplicate of this bug. ***
Comment 8 Matthew Barnes 2008-11-19 14:43:42 UTC
Seems to work fine with Evolution 2.24.  Closing as FIXED.