Hello community,

here is the log from the commit of package at-spi2-core for openSUSE:Factory 
checked in at 2014-06-18 07:50:30
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/at-spi2-core (Old)
 and      /work/SRC/openSUSE:Factory/.at-spi2-core.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "at-spi2-core"

Changes:
--------
--- /work/SRC/openSUSE:Factory/at-spi2-core/at-spi2-core.changes        
2014-05-05 21:14:10.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.at-spi2-core.new/at-spi2-core.changes   
2014-06-18 07:52:43.000000000 +0200
@@ -1,0 +2,13 @@
+Fri May 30 03:14:44 UTC 2014 - dli...@suse.com
+
+- Add at-spi2-core-cancel-logout.patch (bnc#876680)
+  gnome-session emit SessionRunning after turn back from 
+          QueryEndSession
+
+-------------------------------------------------------------------
+Tue May  6 06:33:19 UTC 2014 - dli...@suse.com
+
+- Add at-spi2-register-on-session-running.patch
+  register the client when session manager is running. (bnc#873541)
+
+-------------------------------------------------------------------

New:
----
  at-spi2-core-cancel-logout.patch
  at-spi2-register-on-session-running.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ at-spi2-core.spec ++++++
--- /var/tmp/diff_new_pack.dvxvI2/_old  2014-06-18 07:52:44.000000000 +0200
+++ /var/tmp/diff_new_pack.dvxvI2/_new  2014-06-18 07:52:44.000000000 +0200
@@ -26,6 +26,10 @@
 Source0:        
http://download.gnome.org/sources/at-spi2-core/2.12/%{name}-%{version}.tar.xz
 Source98:       baselibs.conf
 Source99:       %{name}-rpmlintrc
+# PATCH-FIX-UPSTREAM at-spi2-register-on-session-running.patch bnc#873541 
dli...@suse.com -- register to session in autostart session
+Patch0:         at-spi2-register-on-session-running.patch
+# PATCH-FIX-UPSTREAM at-spi2-core-cancel-logout.patch bnc#876680 
dli...@suse.com -- register to gnome-session only one time
+Patch1:         at-spi2-core-cancel-logout.patch
 BuildRequires:  glib2-devel
 BuildRequires:  gobject-introspection-devel
 BuildRequires:  intltool
@@ -80,6 +84,8 @@
 %lang_package
 %prep
 %setup -q
+%patch0 -p1
+%patch1 -p1
 
 %build
 %configure \

++++++ at-spi2-core-cancel-logout.patch ++++++
diff -Npur at-spi2-core-2.10.2-bak/registryd/registry-main.c 
at-spi2-core-2.10.2/registryd/registry-main.c
--- at-spi2-core-2.10.2-bak/registryd/registry-main.c   2014-05-30 
03:00:30.249444690 +0800
+++ at-spi2-core-2.10.2/registryd/registry-main.c       2014-05-30 
03:01:05.005444798 +0800
@@ -164,6 +164,9 @@ register_client (void)
         const char *startup_id;
         const char *app_id;
 
+        if (client_proxy)
+                return TRUE;
+       
         startup_id = g_getenv ("DESKTOP_AUTOSTART_ID");
         if (!startup_id)
                 startup_id = "";
++++++ at-spi2-register-on-session-running.patch ++++++
diff -Npur at-spi2-core-2.12.0/registryd/registry-main.c 
at-spi2-core-2.12.0-new/registryd/registry-main.c
--- at-spi2-core-2.12.0/registryd/registry-main.c       2014-03-17 
21:47:05.000000000 +0800
+++ at-spi2-core-2.12.0-new/registryd/registry-main.c   2014-05-06 
14:45:04.371517936 +0800
@@ -57,8 +57,10 @@ static GDBusProxy      *client_proxy = N
 
 #define SM_CLIENT_DBUS_INTERFACE "org.gnome.SessionManager.ClientPrivate"
 
+static gboolean register_client (void);
+
 static void
-on_session_over (GDBusProxy *proxy,
+on_session_signal (GDBusProxy *proxy,
                  gchar      *sender_name,
                  gchar      *signal_name,
                  GVariant   *parameters,
@@ -66,20 +68,38 @@ on_session_over (GDBusProxy *proxy,
 {
         if (g_strcmp0 (signal_name, "SessionOver") == 0) {
                 g_main_loop_quit (mainloop);
+        } else if (g_strcmp0 (signal_name, "SessionRunning") == 0) {
+                if (!register_client ())
+                        g_warning ("Unable to register client with session 
manager");
         }
 }
 
 static gboolean
 session_manager_connect (void)
 {
+        GVariant *res;
+        gboolean is_running;
 
         sm_proxy = g_dbus_proxy_new_for_bus_sync (G_BUS_TYPE_SESSION, 0, NULL,
                                               SM_DBUS_NAME,
                                               SM_DBUS_PATH,
                                               SM_DBUS_INTERFACE, NULL, NULL);
 
+        res = g_dbus_proxy_call_sync (sm_proxy,
+                                 "IsSessionRunning", NULL,
+                                  0, 1000, NULL, NULL);
+
+        if (res) {
+                g_variant_get (res, "(b)", &is_running);
+                g_variant_unref (res);
+                if (is_running) {
+                        if (!register_client ())
+                                g_warning ("Unable to register client with 
session manager");
+                }
+        }
+
         g_signal_connect (G_OBJECT (sm_proxy), "g-signal",
-                          G_CALLBACK (on_session_over), NULL);
+                          G_CALLBACK (on_session_signal), NULL);
 
         return (sm_proxy != NULL);
 }
@@ -87,7 +107,7 @@ session_manager_connect (void)
 static gboolean
 end_session_response (gboolean is_okay, const gchar *reason)
 {
-  GVariant *ret;
+        GVariant *ret;
         GError *error = NULL;
 
         if (!reason)
@@ -132,7 +152,7 @@ static gboolean
 register_client (void)
 {
         GError     *error;
-  GVariant *res;
+        GVariant *res;
         const char *startup_id;
         const char *app_id;
 
@@ -232,9 +252,6 @@ main (int argc, char **argv)
     {
       if (!session_manager_connect ())
           g_warning ("Unable to connect to session manager");
-
-      if (!register_client ())
-          g_warning ("Unable to register client with session manager");
     }
 
   g_main_loop_run (mainloop);
-- 
To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org
For additional commands, e-mail: opensuse-commit+h...@opensuse.org

Reply via email to