[arch-commits] Commit in exo/trunk (3 files)

Evangelos Foutras foutrelis at archlinux.org
Sun Mar 22 16:46:06 UTC 2015


    Date: Sunday, March 22, 2015 @ 17:46:06
  Author: foutrelis
Revision: 234473

upgpkg: exo 0.10.4-2

Revert startup notification support; prevents some applications started by
exo-helper to receive focus (FS#44282).

Added:
  exo/trunk/0001-Fix-StartupNotify-Bug-9570-thanks-Thaddaeus.patch
  exo/trunk/0001-Fix-implicit-declaration-of-function-xfce_spawn_on_s.patch
Modified:
  exo/trunk/PKGBUILD

-----------------------------------------------------------------+
 0001-Fix-StartupNotify-Bug-9570-thanks-Thaddaeus.patch          |   87 ++++++++++
 0001-Fix-implicit-declaration-of-function-xfce_spawn_on_s.patch |   44 +++++
 PKGBUILD                                                        |   12 +
 3 files changed, 142 insertions(+), 1 deletion(-)

Added: 0001-Fix-StartupNotify-Bug-9570-thanks-Thaddaeus.patch
===================================================================
--- 0001-Fix-StartupNotify-Bug-9570-thanks-Thaddaeus.patch	                        (rev 0)
+++ 0001-Fix-StartupNotify-Bug-9570-thanks-Thaddaeus.patch	2015-03-22 16:46:06 UTC (rev 234473)
@@ -0,0 +1,87 @@
+From 3a2c05bd68f924f5c8bd530a2fe8f4cc5b671b16 Mon Sep 17 00:00:00 2001
+From: Sean Davis <smd.seandavis at gmail.com>
+Date: Thu, 5 Mar 2015 15:55:59 -0500
+Subject: [PATCH] Fix StartupNotify (Bug 9570, thanks Thaddaeus)
+
+---
+ exo-helper/exo-helper.c | 52 +++----------------------------------------------
+ 1 file changed, 3 insertions(+), 49 deletions(-)
+
+diff --git a/exo-helper/exo-helper.c b/exo-helper/exo-helper.c
+index 37d8901..aba3749 100644
+--- a/exo-helper/exo-helper.c
++++ b/exo-helper/exo-helper.c
+@@ -359,8 +359,6 @@ exo_helper_execute (ExoHelper   *helper,
+   gint          pid;
+   const gchar  *real_parameter = parameter;
+ 
+-  // FIXME: startup-notification
+-
+   g_return_val_if_fail (EXO_IS_HELPER (helper), FALSE);
+   g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
+   g_return_val_if_fail (screen == NULL || GDK_IS_SCREEN (screen), FALSE);
+@@ -399,58 +397,14 @@ exo_helper_execute (ExoHelper   *helper,
+         continue;
+ 
+       /* try to run the command */
+-      succeed = gdk_spawn_on_screen (screen, NULL, argv, NULL, G_SPAWN_DO_NOT_REAP_CHILD | G_SPAWN_SEARCH_PATH, NULL, NULL, &pid, &err);
++      succeed = xfce_spawn_on_screen (screen, NULL, argv, NULL, G_SPAWN_SEARCH_PATH, helper->startup_notify, gtk_get_current_event_time (), NULL, &err);
+ 
+       /* cleanup */
+       g_strfreev (argv);
+ 
+-      /* check if the execution was successful */
++      /* check if we should retry with the next command */
+       if (G_LIKELY (succeed))
+-        {
+-          /* determine the current time */
+-          g_get_current_time (&previous);
+-
+-          /* wait up to 5 seconds to see whether the command worked */
+-          for (;;)
+-            {
+-              /* check if the command exited with an error */
+-              result = waitpid (pid, &status, WNOHANG);
+-              if (result < 0)
+-                {
+-                  /* something weird happened */
+-                  err = g_error_new_literal (G_FILE_ERROR, g_file_error_from_errno (errno), g_strerror (errno));
+-                  succeed = FALSE;
+-                  break;
+-                }
+-              else if (result > 0 && status != 0)
+-                {
+-                  /* the command failed */
+-                  err = g_error_new_literal (G_FILE_ERROR, g_file_error_from_errno (EIO), g_strerror (EIO));
+-                  succeed = FALSE;
+-                  break;
+-                }
+-              else if (result == pid)
+-                {
+-                  /* the command succeed */
+-                  succeed = TRUE;
+-                  break;
+-                }
+-
+-              /* determine the current time */
+-              g_get_current_time (&current);
+-
+-              /* check if the command is still running after 5 seconds (which indicates that the command worked) */
+-              if (((current.tv_sec - previous.tv_sec) * 1000ll + (current.tv_usec - previous.tv_usec) / 1000ll) > 5000ll)
+-                break;
+-
+-              /* wait some time */
+-              g_usleep (50 * 1000);
+-            }
+-
+-          /* check if we should retry with the next command */
+-          if (G_LIKELY (succeed))
+-            break;
+-        }
++        break;
+     }
+ 
+   /* propagate the error */
+-- 
+2.3.3
+

Added: 0001-Fix-implicit-declaration-of-function-xfce_spawn_on_s.patch
===================================================================
--- 0001-Fix-implicit-declaration-of-function-xfce_spawn_on_s.patch	                        (rev 0)
+++ 0001-Fix-implicit-declaration-of-function-xfce_spawn_on_s.patch	2015-03-22 16:46:06 UTC (rev 234473)
@@ -0,0 +1,44 @@
+From 4e68afc085d23bd77cf94e0e8e2e1435f0b4ebaa Mon Sep 17 00:00:00 2001
+From: Matt Thirtytwo <matt.59491 at gmail.com>
+Date: Sat, 7 Mar 2015 22:23:45 +0100
+Subject: [PATCH] Fix implicit declaration of function 'xfce_spawn_on_screen'
+ (bug #11655)
+
+Also fix a few unused variable warnings.
+---
+ exo-helper/exo-helper.c | 6 +-----
+ 1 file changed, 1 insertion(+), 5 deletions(-)
+
+diff --git a/exo-helper/exo-helper.c b/exo-helper/exo-helper.c
+index aba3749..6931347 100644
+--- a/exo-helper/exo-helper.c
++++ b/exo-helper/exo-helper.c
+@@ -43,6 +43,7 @@
+ #include <unistd.h>
+ #endif
+ 
++#include <libxfce4ui/libxfce4ui.h>
+ #include <exo-helper/exo-helper.h>
+ #include <exo-helper/exo-helper-utils.h>
+ 
+@@ -346,17 +347,12 @@ exo_helper_execute (ExoHelper   *helper,
+                     const gchar *parameter,
+                     GError     **error)
+ {
+-  GTimeVal      previous;
+-  GTimeVal      current;
+   gboolean      succeed = FALSE;
+   GError       *err = NULL;
+   gchar       **commands;
+   gchar       **argv;
+   gchar        *command;
+   guint         n;
+-  gint          status;
+-  gint          result;
+-  gint          pid;
+   const gchar  *real_parameter = parameter;
+ 
+   g_return_val_if_fail (EXO_IS_HELPER (helper), FALSE);
+-- 
+2.3.3
+

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2015-03-22 15:51:09 UTC (rev 234472)
+++ PKGBUILD	2015-03-22 16:46:06 UTC (rev 234473)
@@ -5,7 +5,7 @@
 
 pkgname=exo
 pkgver=0.10.4
-pkgrel=1
+pkgrel=2
 pkgdesc="Extensions to Xfce by os-cillation"
 arch=('i686' 'x86_64')
 url="http://www.xfce.org/"
@@ -16,13 +16,23 @@
 optdepends=('perl-uri: for mail-compose helper script')
 install=$pkgname.install
 source=(http://archive.xfce.org/src/xfce/$pkgname/${pkgver%.*}/$pkgname-$pkgver.tar.bz2
+        0001-Fix-StartupNotify-Bug-9570-thanks-Thaddaeus.patch
+        0001-Fix-implicit-declaration-of-function-xfce_spawn_on_s.patch
         0001-Do-not-use-x-scheme-handler-file-mimetype-bug-7257.patch)
 sha256sums=('cced5fdbc0b61a5d976210ff71ecdd81b89fcd15e5860a44f50da7b83fb2deaa'
+            'a8f8970b4abd2b8306f402208ddea96088fdc2a804502429ba17aac65cac127d'
+            'cf5f87b3a0d7bf480434f76133473171d36fdcec3cdf79ffcdc6b673b09eb9c8'
             'c88e796ae965db83ec340a1530dbcc48aab39062b7499bf7834cf3459555bdb9')
 
 prepare() {
   cd "$srcdir/$pkgname-$pkgver"
 
+  # Revert startup notification support; prevents some applications started by
+  # exo-helper to receive focus (FS#44282)
+  # https://bugzilla.xfce.org/show_bug.cgi?id=9570#c18
+  patch -Rp1 -i ../0001-Fix-implicit-declaration-of-function-xfce_spawn_on_s.patch
+  patch -Rp1 -i ../0001-Fix-StartupNotify-Bug-9570-thanks-Thaddaeus.patch
+
   # https://bugzilla.xfce.org/show_bug.cgi?id=7257
   patch -Np1 -i ../0001-Do-not-use-x-scheme-handler-file-mimetype-bug-7257.patch
 }



More information about the arch-commits mailing list