← Back to team overview

cairo-dock-team team mailing list archive

[Merge] lp:~cairo-dock-team/ubuntu/precise/cairo-dock/988102 into lp:ubuntu/cairo-dock

 

Matthieu Baerts has proposed merging lp:~cairo-dock-team/ubuntu/precise/cairo-dock/988102 into lp:ubuntu/cairo-dock.

Requested reviews:
  Ubuntu Sponsors Team (ubuntu-sponsors)
Related bugs:
  Bug #988102 in cairo-dock (Ubuntu): "Dock's menu: don't hide the dock if it is raised and don't try to check if the mouse has left the dock if the menu is raised "
  https://bugs.launchpad.net/ubuntu/+source/cairo-dock/+bug/988102

For more details, see:
https://code.launchpad.net/~cairo-dock-team/ubuntu/precise/cairo-dock/988102/+merge/103397

Hello

The Cairo-Dock team is proposing a new patch to fix two bugs with Cairo-Dock's menus:
 * don't hide the dock if this dock is raised
 * don't try to check if the mouse has left the dock if the menu is raised

How to reproduce these bugs:
 * open an application and maximise its window: the dock is now hidden (except if you've modified the visibility option). Now move the mouse to display the dock and do a right click on it. You'll see a menu but the dock will disappear (it should be visible to have an interaction with the dock and to show the changes, etc.)
 * do a right click on the dock (or a left click on the Applications Menu applet or Status-Notifier applet, etc.) and quickly move the mouse somewhere else on the dock. You should see something like that: http://i.imgur.com/lrZGX.png (here we can see two icons of musicPlayer applet instead of one and Clipper icon has been partially hidden)

This patch is available there: lp:cairo-dock-core/3.0 => https://bazaar.launchpad.net/~cairo-dock-team/cairo-dock-core/3.0.x/revision/1070

This branch should be ready to be pushed on lp:ubuntu/cairo-dock

Thank you for your help! ;)
-- 
https://code.launchpad.net/~cairo-dock-team/ubuntu/precise/cairo-dock/988102/+merge/103397
Your team Cairo-Dock Team is subscribed to branch lp:~cairo-dock-team/ubuntu/precise/cairo-dock/988102.
=== modified file 'debian/changelog'
--- debian/changelog	2012-04-17 06:57:26 +0000
+++ debian/changelog	2012-04-25 00:08:18 +0000
@@ -1,3 +1,12 @@
+cairo-dock (3.0.0.1-0ubuntu2) precise; urgency=low
+
+  * debian/patches/01-bzr_dock-s_menu.patch: don't hide the dock if it's raised
+    and don't try to check if the mouse has left the dock if the menu is raised
+    (LP: #988102)
+   - It's an uptream's patch (lp:cairo-dock-core/3.0 - rev 1070)
+
+ -- Matthieu Baerts (matttbe) <matttbe@xxxxxxxxx>  Wed, 25 Apr 2012 01:29:46 +0200
+
 cairo-dock (3.0.0.1-0ubuntu1) precise; urgency=low
 
   * New upstream release. (LP: #983288)

=== added file 'debian/patches/01-bzr_dock-s_menu.patch'
--- debian/patches/01-bzr_dock-s_menu.patch	1970-01-01 00:00:00 +0000
+++ debian/patches/01-bzr_dock-s_menu.patch	2012-04-25 00:08:18 +0000
@@ -0,0 +1,48 @@
+## Description: Dock's menu: don't hide  the dock if it is raised and don't try to check if the mouse has left the dock if the menu is raised 
+## Origin/Author: Upstream (Fabrice Rey)
+## https://bazaar.launchpad.net/~cairo-dock-team/cairo-dock-core/3.0.x/revision/1070
+
+Index: cairo-dock/src/gldit/cairo-dock-callbacks.c
+===================================================================
+--- cairo-dock.orig/src/gldit/cairo-dock-callbacks.c	2012-04-16 18:03:45.645725000 +0200
++++ cairo-dock/src/gldit/cairo-dock-callbacks.c	2012-04-24 02:34:27.416854701 +0200
+@@ -763,10 +763,10 @@
+ 	{
+ 		//g_print ("forced leave event: %d;%d\n", pDock->container.iMouseX, pDock->container.iMouseY);
+ 	}
+-	if (pEvent && !_mouse_is_really_outside(pDock))  // check that the mouse is really outside (only if the request comes from the Window Manager; this is to work around buggy WM like KWin).
++	if (/**pEvent && */!_mouse_is_really_outside(pDock))  // check that the mouse is really outside (the request might not come from the Window Manager, for instance if we deactivate the menu; this also works around buggy WM like KWin).
+ 	{
+ 		//g_print ("not really outside (%d;%d ; %d/%d)\n", pDock->container.iMouseX, pDock->container.iMouseY, pDock->iMaxDockHeight, pDock->iMinDockHeight);
+-		if (pDock->iSidTestMouseOutside == 0 && pEvent)  // si l'action induit un changement de bureau, ou une appli qui bloque le focus (gksu), X envoit un signal de sortie alors qu'on est encore dans le dock, et donc n'en n'envoit plus lorsqu'on en sort reellement. On teste donc pendant qques secondes apres l'evenement.
++		if (pDock->iSidTestMouseOutside == 0 && pEvent && ! pDock->bMenuVisible)  // si l'action induit un changement de bureau, ou une appli qui bloque le focus (gksu), X envoit un signal de sortie alors qu'on est encore dans le dock, et donc n'en n'envoit plus lorsqu'on en sort reellement. On teste donc pendant qques secondes apres l'evenement. C'est ausi vrai pour l'affichage d'un menu, mais comme on envoie nous-meme un signal de sortie lorsque le menu disparait, il est inutile de le faire ici.
+ 		{
+ 			//g_print ("start checking mouse\n");
+ 			pDock->iSidTestMouseOutside = g_timeout_add (500, (GSourceFunc)_check_mouse_outside, pDock);
+@@ -1038,7 +1038,7 @@
+ static gboolean _check_mouse_outside (CairoDock *pDock)  // ce test est principalement fait pour detecter les cas ou X nous envoit un signal leave errone alors qu'on est dedans (=> sortie refusee, bInside reste a TRUE), puis du coup ne nous en envoit pas de leave lorsqu'on quitte reellement le dock.
+ {
+ 	//g_print ("%s (%d, %d, %d)\n", __func__, pDock->bIsShrinkingDown, pDock->iMagnitudeIndex, pDock->container.bInside);
+-	if (pDock->bIsShrinkingDown || pDock->iMagnitudeIndex == 0 || ! pDock->container.bInside)  // cas triviaux : si le dock est deja retrecit, ou qu'on est deja plus dedans, on peut quitter.
++	if (pDock->bIsShrinkingDown || pDock->iMagnitudeIndex == 0 || ! pDock->container.bInside)  // trivial cases : if the dock has already shrunk, or we're not inside any more, we can quit the loop.
+ 	{
+ 		pDock->iSidTestMouseOutside = 0;
+ 		return FALSE;
+Index: cairo-dock/src/gldit/cairo-dock-dock-factory.c
+===================================================================
+--- cairo-dock.orig/src/gldit/cairo-dock-dock-factory.c	2012-04-16 18:03:45.645725000 +0200
++++ cairo-dock/src/gldit/cairo-dock-dock-factory.c	2012-04-24 02:34:27.416854701 +0200
+@@ -443,8 +443,11 @@
+ {
+ 	//g_print ("\n+++ %s ()\n\n", __func__);
+ 	g_return_if_fail (CAIRO_DOCK_IS_DOCK (pDock));
+-	pDock->bMenuVisible = FALSE;
+-	cairo_dock_emit_leave_signal (CAIRO_CONTAINER (pDock));
++	if (pDock->bMenuVisible)  // don't send the signal if the menu was already deactivated.
++	{
++		pDock->bMenuVisible = FALSE;
++		cairo_dock_emit_leave_signal (CAIRO_CONTAINER (pDock));
++	}
+ }
+ static void _on_menu_destroyed (GtkWidget *menu, CairoDock *pDock)
+ {

=== modified file 'debian/patches/series'
--- debian/patches/series	2012-02-16 01:08:11 +0000
+++ debian/patches/series	2012-04-25 00:08:18 +0000
@@ -0,0 +1,1 @@
+01-bzr_dock-s_menu.patch


Follow ups