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 623688 - Startup notification for app that isn't being started
Startup notification for app that isn't being started
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Colin Walters
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2010-07-06 15:08 UTC by William Jon McCann
Modified: 2010-10-06 21:34 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
correct handle state for applications with several .destop files (2.73 KB, patch)
2010-07-16 14:19 UTC, Maxim Ermilov
none Details | Review
show startup notification only for current workspace (6.06 KB, patch)
2010-07-16 14:19 UTC, Maxim Ermilov
none Details | Review
[ShellApp] refactor handling startup sequence (5.57 KB, patch)
2010-09-28 16:34 UTC, Maxim Ermilov
none Details | Review
show startup notification only for current workspace (4.55 KB, patch)
2010-09-28 16:35 UTC, Maxim Ermilov
reviewed Details | Review
[ShellApp] refactor handling startup sequence (5.59 KB, patch)
2010-09-29 13:25 UTC, Maxim Ermilov
committed Details | Review
show startup notification only for current workspace (4.42 KB, patch)
2010-10-06 20:51 UTC, Maxim Ermilov
committed Details | Review

Description William Jon McCann 2010-07-06 15:08:58 UTC
1. Start shell
2. Launch "Desktop" place via dash
3. Return to overview and create a new workspace (defaults to grid mode!?)
4. On new workspace "Open Folder" is the app and it is starting
Comment 1 Maxim Ermilov 2010-07-16 14:19:03 UTC
Created attachment 166021 [details] [review]
correct handle state for applications with several .destop files
Comment 2 Maxim Ermilov 2010-07-16 14:19:48 UTC
Created attachment 166022 [details] [review]
show startup notification only for current workspace
Comment 3 Colin Walters 2010-07-21 14:39:46 UTC
I don't really understand these patches at all honestly - shouldn't we just special case Nautilus as "running but hidden"?
Comment 4 Maxim Ermilov 2010-07-21 15:00:13 UTC
(In reply to comment #3)
> I don't really understand these patches at all honestly - shouldn't we just
> special case Nautilus as "running but hidden"?

1. we start nautilus-folder-handler.desktop (and got this desktop file path  from startup-notification).
2. When nautilus window is open, we got nautilus.desktop from WMCLASS. 
So nautilus-folder-handler.desktop will always has STARTING state.

Same will happen for all applications with 2 (or more) desktop files.


Second patch is about disrespect workspace property from startup notification (We show notification on all workspaces).
Comment 5 Colin Walters 2010-07-21 16:29:05 UTC
(In reply to comment #4)
> (In reply to comment #3)
> > I don't really understand these patches at all honestly - shouldn't we just
> > special case Nautilus as "running but hidden"?
> 
> 1. we start nautilus-folder-handler.desktop (and got this desktop file path 
> from startup-notification).

Can we just ignore the start for nautilus-folder-handler.desktop because it's NoDisplay=true?  (Check shell_app_info_get_is_nodisplay)

This would mean we wouldn't show startup notification for Evince, but I think we just need to revert that Evince issue.
Comment 6 Maxim Ermilov 2010-07-21 17:41:17 UTC
(In reply to comment #5)
> Can we just ignore the start for nautilus-folder-handler.desktop because it's
> NoDisplay=true?  (Check shell_app_info_get_is_nodisplay)
> 
> This would mean we wouldn't show startup notification for Evince, but I think
> we just need to revert that Evince issue.

We can't.
If we do that 
1. startup notification will not work for some applications. ( I think more then 1)
2. In my opinion, Not all application (with 2 or more .desktop files) has only 1 .desktop file _without_ NoDisplay=true.
(For example: I create .desktop file with custom command line. And I want it and original .desktop file in menu)
Comment 7 Colin Walters 2010-07-21 20:06:48 UTC
(In reply to comment #6)
> (In reply to comment #5)
> > Can we just ignore the start for nautilus-folder-handler.desktop because it's
> > NoDisplay=true?  (Check shell_app_info_get_is_nodisplay)
> > 
> > This would mean we wouldn't show startup notification for Evince, but I think
> > we just need to revert that Evince issue.
> 
> We can't.
> If we do that 
> 1. startup notification will not work for some applications. ( I think more
> then 1)

What other ones?  The other fixes are:

* Don't have the shell launch nautilus through the .desktop file for these
* Remove StartupNotify=true from nautilus-folder-handler.desktop
* Fix nautilus/gtk+ to correctly complete startup notification when showing a window from nautilus-folder-handler.desktop

> 2. In my opinion, Not all application (with 2 or more .desktop files) has only
> 1 .desktop file _without_ NoDisplay=true.
> (For example: I create .desktop file with custom command line. And I want it
> and original .desktop file in menu)

If you have a new .desktop file you should have a new app, basically.  Is this use case something like a custom .desktop file that launches gnome-terminal --blah ?  We could have a special .desktop key Shortcut=true or something for that I guess.
Comment 8 Maxim Ermilov 2010-07-21 21:11:18 UTC
(In reply to comment #7)
> What other ones?  The other fixes are:
> * Don't have the shell launch nautilus through the .desktop file for these
Will not work.
Any application that use g_app_info_launch_default_for_uri ('/a/b/') will bring same problem.

> * Remove StartupNotify=true from nautilus-folder-handler.desktop
> * Fix nautilus/gtk+ to correctly complete startup notification when showing a
> window from nautilus-folder-handler.desktop

Is it normal, that "broken" application can bring such problem?

> If you have a new .desktop file you should have a new app, basically.  Is this
> use case something like a custom .desktop file that launches gnome-terminal
> --blah ?
yes

What about second patch?
Comment 9 Maxim Ermilov 2010-09-28 16:34:22 UTC
Created attachment 171277 [details] [review]
[ShellApp] refactor handling startup sequence 

1. move logic to shell-app.c
2. change state to RUNNING only after startup sequence complete
3. correct handle state for applications with several .destop files
Comment 10 Maxim Ermilov 2010-09-28 16:35:49 UTC
Created attachment 171278 [details] [review]
show startup notification only for current workspace

merge with HEAD
Comment 11 Maxim Ermilov 2010-09-29 13:25:23 UTC
Created attachment 171335 [details] [review]
[ShellApp] refactor handling startup sequence

1. move logic to shell-app.c
2. change state to RUNNING only after startup sequence complete
3. correct handle state for applications with several .destop files
Comment 12 Colin Walters 2010-10-04 17:08:04 UTC
(In reply to comment #0)
> 1. Start shell
> 2. Launch "Desktop" place via dash
> 3. Return to overview and create a new workspace (defaults to grid mode!?)
> 4. On new workspace "Open Folder" is the app and it is starting

What's the desired result actually?  Should the "File Manager" app be starting?  (I assume so)

If the file manager loads after you switch workspaces, should it appear on the workspace you launched it from (I assume so)?
Comment 13 William Jon McCann 2010-10-04 17:16:49 UTC
The expected result is that there is no app running (or starting) on the new workspace.
Comment 14 Colin Walters 2010-10-04 20:35:32 UTC
Hmm...so taking out the workspace switching part:

Should we be displaying any notification at all of File Manager starting, ever?
Comment 15 Colin Walters 2010-10-04 20:41:12 UTC
Right now it looks like nautilus blocks display of the whole window until it's mostly loaded the contents.  We could change it to try to get at least an empty window up faster?
Comment 16 Maxim Ermilov 2010-10-05 14:18:15 UTC
(In reply to comment #14)
> Should we be displaying any notification at all of File Manager starting, ever?

yes. But on right workspace.
Comment 17 Colin Walters 2010-10-06 20:08:16 UTC
Review of attachment 171278 [details] [review]:

::: js/ui/panel.js
@@ +191,1 @@
+        this._targedApp = null;

Looks like a typo, should be this._targetApp or this._targetedApp ?

@@ +448,1 @@
+        if (!focusedApp && 0) {

Why is this here?
Comment 18 Maxim Ermilov 2010-10-06 20:51:01 UTC
Created attachment 171851 [details] [review]
show startup notification only for current workspace

> Looks like a typo, should be this._targetApp or this._targetedApp ?
this._targetApp

> Why is this here?
Sorry. I forget remove this after testing.
Comment 19 Colin Walters 2010-10-06 21:14:26 UTC
Review of attachment 171851 [details] [review]:

OK.  For commit message, I suggest:

panel: Only show starting applications for current workspace

Add the workspace we started on to ShellApp.  Use it inside panel.js
to filter the list.
Comment 20 Colin Walters 2010-10-06 21:16:53 UTC
Review of attachment 171335 [details] [review]:

Looks good to me.  (One typo in your commit message, s/destop/desktop).