Git Version | Version Git
matttbe, Thursday 18 July 2013 à 15:55
|
|
Subscription date : 26 October 2008
Messages : 1904
|
Does that mean you are blocking the same application launch during this time frame?
I have got a very old touchpad which is very sensitive and i always end up with two or more window of the same type (quite annoying) because i triple click without knowing it.
That would be a nice addition as well |
matttbe, Thursday 18 July 2013 à 22:01
|
|
Subscription date : 24 January 2009
Messages : 12573
|
No but we can add another feature.
But I think that blocking the same application launch during this time frame is maybe a too long time if you want to launch more that one application BUT if you want to launch 2 applications, you should use "SHIFT" + Clic which is not the case here.
@fabounet: what do you think about that? (I no longer see you on IRC ) |
matttbe, Thursday 18 July 2013 à 22:34
|
|
Subscription date : 24 January 2009
Messages : 12573
|
And it's easy to implement it: === modified file 'src/cairo-dock-user-interaction.c'
--- src/cairo-dock-user-interaction.c 2013-07-18 17:00:13 +0000
+++ src/cairo-dock-user-interaction.c 2013-07-18 20:38:57 +0000
@@ -180,7 +180,7 @@
}
}
-static gboolean _launch_icon_command (Icon *icon, CairoDock *pDock)
+static gboolean _launch_icon_command (Icon *icon, CairoDock *pDock, gboolean bForce)
{
if (icon->cCommand == NULL)
return GLDI_NOTIFICATION_LET_PASS;
@@ -191,7 +191,12 @@
if (CAIRO_DOCK_IS_APPLET (pMainIcon))
return GLDI_NOTIFICATION_LET_PASS;
}
-
+
+ + + if (! bForce && icon->iSidAnimationOpening != 0)
+ return GLDI_NOTIFICATION_INTERCEPT;
+
gboolean bSuccess = FALSE;
if (*icon->cCommand == '<') {
@@ -224,7 +229,7 @@
|| CAIRO_DOCK_ICON_TYPE_IS_APPLI (icon)
|| CAIRO_DOCK_ICON_TYPE_IS_CLASS_CONTAINER (icon))
{
- return _launch_icon_command (icon, pDock);
+ return _launch_icon_command (icon, pDock, TRUE);
}
return GLDI_NOTIFICATION_LET_PASS;
}
@@ -269,7 +274,7 @@
}
else if (CAIRO_DOCK_ICON_TYPE_IS_LAUNCHER (icon)) {
- return _launch_icon_command (icon, pDock);
+ return _launch_icon_command (icon, pDock, FALSE);
}
else
{
|
Subscription date : 26 October 2008
Messages : 1904
|
+10000 |
Subscription date : 26 October 2008
Messages : 1904
|
Thanks. I like it |
matttbe, Monday 22 July 2013 à 17:06
|
|
Subscription date : 24 January 2009
Messages : 12573
|
Oops, this modif is also in the Weekly ppa
(Arf, I forgot it...) |
matttbe, Monday 22 July 2013 à 18:06
|
|
Subscription date : 24 January 2009
Messages : 12573
|
@fabounet: can I add a new DBus method to launch the application which is linked to the launcher with this feature?
Many Third-party applets control an application. |
matttbe, Thursday 22 August 2013 à 00:09
|
|
Subscription date : 24 January 2009
Messages : 12573
|
@fabounet: According to the latest rev on BZR, the support of the StartupNotify protocol has been added. I have a few questions about that
- If I understand well, if the .desktop file of an application contains this line 'StartupNotify=true', it means that the corresponding application will send a signal (remove:(...)) when its window is shown. Is it right?
- But why do we need to support it (by checking all ClientMessage events from X11)? We already know when a window is shown
- But maybe if we know that this application supports StartupNotify:
- we could add a longer timeout (iSidOpeningTimeout).
- But we can only know when an application is launched if we launch it by ourself (or maybe by listening DBus messages? It seems Zeitgeist do that (e.g. here) => org.gtk.gio.DesktopAppInfo)
- GMenu could directly create a new icon (if this application is not linked to a launcher) and launch this new opening animation.
- I see that you added 'bHasStartupNotify' variable in the structure of 'CairoDockClassAppli' but it's not used. Does it mean that the implementation is not complete and that you prepare other nice things?
PS: I no longer see you on IRC, do you still (want to) use it? |
fabounet, Thursday 22 August 2013 à 16:23
|
|
Subscription date : 30 November 2007
Messages : 17118
|
We already know when a window is shown
not all the time
for instance, consider lanching pidgin twice; it will just pop the existing window and quit, and if pidgin is already the active window, you get no clue to stop the animation
if the program supports the protocol correctly, it will send the "remove" message before quitting (counter-example: gedit does not and it's a bug)
see http://standards.freedesktop.org/startup-notification-spec/startup-notification-latest.txt for the details (Hint: the "launchee" is us )
I've added bHasStartupNotify in the process of writing the code, but finally I think we may not need it
the implementation is indeed not complete, but is enough for us
I no longer see you on IRC
yes sorry, not so much time since I got my new job, so I prefer coding when I can (but IRC is still nice for us or even users who'd like to contact us) |
matttbe, Thursday 22 August 2013 à 20:15
|
|
Subscription date : 24 January 2009
Messages : 12573
|
not all the time
for instance, consider lanching pidgin twice; it will just pop the existing window and quit, and if pidgin is already the active window, you get no clue to stop the animation
if the program supports the protocol correctly, it will send the "remove" message before quitting (counter-example: gedit does not and it's a bug)
see http://standards.freedesktop.org/startup-notification-spec/startup-notification-latest.txt for the details (Hint: the "launchee" is us ) Ok, thank you for these details!
And what do you think about the 3th item? But maybe if we know that this application supports StartupNotify:
- we could add a longer timeout (iSidOpeningTimeout).
- But we can only know when an application is launched if we launch it by ourself (or maybe by listening DBus messages? It seems Zeitgeist do that (e.g. here) => org.gtk.gio.DesktopAppInfo)
- GMenu could directly create a new icon (if this application is not linked to a launcher) and launch this new opening animation.
Especially about GMenu
yes sorry, not so much time since I got my new job, so I prefer coding when I can (but IRC is still nice for us or even users who'd like to contact us) You don't have to say "sorry", I understand
It's just that if you're coding on your pc, don't hesitate to open XChat/Pidgin (but note that I'm not regularly connected too ) |
Subscription date : 30 November 2007
Messages : 17118
|
could add a longer timeout
no need I think, even if the application supports the protocol, it can stil fail to launch (and therefore not send the "remove")
But we can only know when an application is launched if we launch it by ourself
indeed, but we don't need really more (at least not for the click animation; and we rarely launch a program from GMenu that is already in the dock)
GMenu could directly create a new icon
hmm, when ? |
matttbe, Saturday 24 August 2013 à 00:10
|
|
Subscription date : 24 January 2009
Messages : 12573
|
no need I think, even if the application supports the protocol, it can stil fail to launch (and therefore not send the "remove") Yes, but if we know that this application supports this protocol, there is more chances that the signal is sent and then we could use a longer timeout (e.g. 20-25 sec) but it's a details
GMenu could directly create a new icon
hmm, when ?
I think it can be interesting that GMenu (or the core) creates an icon as soon as possible and animate it until the corresponding application appears
With this behaviour, the user sees that his application is loading, "something happens", no need to check that he has launched the right application (if the application takes a few time). I think it can be a interesting feature, more integration with other apps, we see what's happening and it's a good thing!
Note that it seems we can detect when an application is launched with GIO (zeitgeist detects when an application is launched from GMenu applet by listening DBus signals: have a look here).
What do you think about that? |
fabounet, Tuesday 27 August 2013 à 17:00
|
|
Subscription date : 30 November 2007
Messages : 17118
|
zeitgeist is not very widespread so we can't rely on it
Note that on KDE, a small icon of the launching application will bounce under the mouse.
this may actually be better than animating an icon in the dock without having clicked it |
matttbe, Tuesday 27 August 2013 à 17:37
|
|
fabounet, Thursday 29 August 2013 à 17:38
|
|
Subscription date : 30 November 2007
Messages : 17118
|
We can see that an application is launching, where the icon will be and I'm sure that the user will know that click will do nothing
well maybe
by listening DBus signals: a gio-launch-listener
I don't know if gio-launch-listener really notifies applications launching or just sends a signal when "gio_launch" (approximate name) is called in a program
I think we should rely on the StartupNotify protocol |
matttbe, Thursday 29 August 2013 à 18:02
|
|
Subscription date : 24 January 2009
Messages : 12573
|
well maybe
I don't know if gio-launch-listener really notifies applications launching or just sends a signal when "gio_launch" (approximate name) is called in a program According to dbus-monitor, it's the first signal that we receive after having launched an application with GIO.
It's linked with GDesktopAppInfo and it seems there are a lot of info according to the source code of GDesktopAppInfo: desktop file, pid, display, uri + extras (info about the origin (the launcher I guess): pid, desktop file, program name, etc.)
I think we should rely on the StartupNotify protocol But with this protocol, we are not notified when an application is launched, no? |
Subscription date : 30 November 2007
Messages : 17118
|
of course we are, that's the sole purpose of this protocol
after having launched an application with GIO
which means only the applications that use it will send a signal, which makes it useless for us |
matttbe, Saturday 31 August 2013 à 00:49
|
|
Subscription date : 24 January 2009
Messages : 12573
|
of course we are, that's the sole purpose of this protocol oh ok, I thought we only receive a signal when the windows were just displayed (when we have to stop the animation) and not when the application was launched (when launching an application from GMenu)
which means only the applications that use it will send a signal, which makes it useless for us No, this signal is send when we launch an application with GIO (e.g. GMenu uses GIO) |
matttbe, Sunday 01 September 2013 à 11:18
|
|
Subscription date : 24 January 2009
Messages : 12573
|
With the latest version, it seems I have a few problems:
- At startup, when I launch Firefox and my music player (by clicking on MP applet in order to launch Clementine), icons are animated until the dock hides (not until the application opens). These windows are maximised (and I used Global-Menu to remove the decorations).
- If I click on MP to stop the player, it works fine but if I click a second time the icon is animated until the dock hides.
EDIT: I confirm that I only this bug when the dock is launched at startup. If I close Firefox and Clementine windows, relaunch the dock and reopen Firefox and Clementine, I don't have these problems.
Is it possible that the protocol is "not ready" when launching the dock at startup?? |
Git Version | Version Git
|