rpms/openoffice.org/devel workspace.gsminhibit.patch, NONE, 1.1 openoffice.org.spec, 1.2049, 1.2050

Caolan McNamara caolanm at fedoraproject.org
Wed Oct 28 10:20:07 UTC 2009


Author: caolanm

Update of /cvs/pkgs/rpms/openoffice.org/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv22267

Modified Files:
	openoffice.org.spec 
Added Files:
	workspace.gsminhibit.patch 
Log Message:
add workspace.gsminhibit.patch for new g-s-m api-de-jour inhibit

workspace.gsminhibit.patch:
 gtk/window/gtkframe.cxx      |   51 ++++++++++++++++++++++---------------------
 inc/plugins/gtk/gtkframe.hxx |    2 -
 2 files changed, 28 insertions(+), 25 deletions(-)

--- NEW FILE workspace.gsminhibit.patch ---

# HG changeset patch
# User cmc at openoffice.org
# Date 1256724641 0
# Node ID 170d9f615c3e644ce95635ba446cd9f4a7bedf1c
# Parent  ccdb8c85656c5ff3cd1ac7b527eac0227cfd7ced
gsminhibit: #i106372#: move to org.gnome.SessionManager

--- a/vcl/unx/gtk/window/gtkframe.cxx	Wed Oct 28 09:17:36 2009 +0000
+++ b/vcl/unx/gtk/window/gtkframe.cxx	Wed Oct 28 10:10:41 2009 +0000
@@ -70,9 +70,9 @@
 #ifdef ENABLE_DBUS
 #include <dbus/dbus-glib.h>
 
-#define GSS_DBUS_SERVICE        "org.gnome.ScreenSaver"
-#define GSS_DBUS_PATH           "/org/gnome/ScreenSaver"
-#define GSS_DBUS_INTERFACE      "org.gnome.ScreenSaver"
+#define GSM_DBUS_SERVICE        "org.gnome.SessionManager"
+#define GSM_DBUS_PATH           "/org/gnome/SessionManager"
+#define GSM_DBUS_INTERFACE      "org.gnome.SessionManager"
 #endif
 
 // make compile on gtk older than 2.10
@@ -565,7 +565,7 @@
     m_pIMHandler		= NULL;
     m_hBackgroundPixmap = None;
     m_nSavedScreenSaverTimeout = 0;
-    m_nGSSCookie = 0;
+    m_nGSMCookie = 0;
     m_nExtStyle         = 0;
     m_pRegion           = NULL;
     m_ePointerStyle     = 0xffff;
@@ -1904,8 +1904,9 @@
 #ifdef ENABLE_DBUS
 /** cookie is returned as an unsigned integer */
 static guint
-dbus_inhibit_gss (const gchar *appname,
-                  const gchar *reason)
+dbus_inhibit_gsm (const gchar *appname,
+                  const gchar *reason,
+                  guint xid)
 {
         gboolean         res;
         guint            cookie;
@@ -1921,20 +1922,22 @@
                 return -1;
         }
 
-        /* get the proxy with gnome-screensaver */
+        /* get the proxy with gnome-session-manager */
         proxy = dbus_g_proxy_new_for_name (session_connection,
-                                           GSS_DBUS_SERVICE,
-                                           GSS_DBUS_PATH,
-                                           GSS_DBUS_INTERFACE);
+                                           GSM_DBUS_SERVICE,
+                                           GSM_DBUS_PATH,
+                                           GSM_DBUS_INTERFACE);
         if (proxy == NULL) {
-                g_warning ("Could not get DBUS proxy: %s", GSS_DBUS_SERVICE);
+                g_warning ("Could not get DBUS proxy: %s", GSM_DBUS_SERVICE);
                 return -1;
         }
 
         res = dbus_g_proxy_call (proxy,
                                  "Inhibit", &error,
                                  G_TYPE_STRING, appname,
+                                 G_TYPE_UINT, xid,
                                  G_TYPE_STRING, reason,
+                                 G_TYPE_UINT, 8, //Inhibit the session being marked as idle
                                  G_TYPE_INVALID,
                                  G_TYPE_UINT, &cookie,
                                  G_TYPE_INVALID);
@@ -1957,15 +1960,14 @@
 }
 
 static void
-dbus_uninhibit_gss (guint cookie)
+dbus_uninhibit_gsm (guint cookie)
 {
         gboolean         res;
         GError          *error = NULL;
         DBusGProxy      *proxy = NULL;
         DBusGConnection *session_connection = NULL;
 
-        /* cookies have to be positive as unsigned */
-        if (cookie < 0) {
+        if (cookie == guint(-1)) {
                 g_warning ("Invalid cookie");
                 return;
         }
@@ -1978,18 +1980,18 @@
                 return;
         }
 
-        /* get the proxy with gnome-screensaver */
+        /* get the proxy with gnome-session-manager */
         proxy = dbus_g_proxy_new_for_name (session_connection,
-                                           GSS_DBUS_SERVICE,
-                                           GSS_DBUS_PATH,
-                                           GSS_DBUS_INTERFACE);
+                                           GSM_DBUS_SERVICE,
+                                           GSM_DBUS_PATH,
+                                           GSM_DBUS_INTERFACE);
         if (proxy == NULL) {
-                g_warning ("Could not get DBUS proxy: %s", GSS_DBUS_SERVICE);
+                g_warning ("Could not get DBUS proxy: %s", GSM_DBUS_SERVICE);
                 return;
         }
 
         res = dbus_g_proxy_call (proxy,
-                                 "UnInhibit",
+                                 "Uninhibit",
                                  &error,
                                  G_TYPE_UINT, cookie,
                                  G_TYPE_INVALID,
@@ -1997,12 +1999,12 @@
 
         /* check the return value */
         if (! res) {
-                g_warning ("UnInhibit method failed");
+                g_warning ("Uninhibit method failed");
         }
 
         /* check the error value */
         if (error != NULL) {
-                g_warning ("Inhibit problem : %s", error->message);
+                g_warning ("Uninhibit problem : %s", error->message);
                 g_error_free (error);
                 cookie = -1;
         }
@@ -2030,7 +2032,8 @@
 							 bPreferBlanking, bAllowExposures );
 		}
 #ifdef ENABLE_DBUS
-		m_nGSSCookie = dbus_inhibit_gss(g_get_application_name(), "presentation");
+		m_nGSMCookie = dbus_inhibit_gsm(g_get_application_name(), "presentation", 
+                    GDK_WINDOW_XID(m_pWindow->window));
 #endif
 	}
 	else
@@ -2041,7 +2044,7 @@
 							 bAllowExposures );
 		m_nSavedScreenSaverTimeout = 0;
 #ifdef ENABLE_DBUS
-		dbus_uninhibit_gss(m_nGSSCookie);
+		dbus_uninhibit_gsm(m_nGSMCookie);
 #endif
 	}
 }
--- a/vcl/unx/inc/plugins/gtk/gtkframe.hxx	Wed Oct 28 09:17:36 2009 +0000
+++ b/vcl/unx/inc/plugins/gtk/gtkframe.hxx	Wed Oct 28 10:10:41 2009 +0000
@@ -180,7 +180,7 @@
     GdkVisibilityState              m_nVisibility;
     PointerStyle                    m_ePointerStyle;
     int                             m_nSavedScreenSaverTimeout;
-    guint                           m_nGSSCookie;
+    guint                           m_nGSMCookie;
     int                             m_nWorkArea;
     bool                            m_bFullscreen;
     bool                            m_bSingleAltPress;



Index: openoffice.org.spec
===================================================================
RCS file: /cvs/pkgs/rpms/openoffice.org/devel/openoffice.org.spec,v
retrieving revision 1.2049
retrieving revision 1.2050
diff -u -p -r1.2049 -r1.2050
--- openoffice.org.spec	21 Oct 2009 09:04:39 -0000	1.2049
+++ openoffice.org.spec	28 Oct 2009 10:20:05 -0000	1.2050
@@ -121,6 +121,7 @@ Patch47: openoffice.org-3.2.0.oooXXXXXX.
 Patch48: openoffice.org-3.2.0.ooo106032.linguistic.defaulttoplain.patch
 Patch49: workspace.impress178.patch
 Patch50: openoffice.org-3.1.1.ooo106130.svx.removedeletedshapes.patch
+Patch51: workspace.gsminhibit.patch
 
 %define python_py_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(0)")
 %define instdir %{_libdir}
@@ -1631,6 +1632,7 @@ cat %{PATCH10} >> svtools/source/dialogs
 %patch48 -p0 -b .ooo106032.linguistic.defaulttoplain.patch
 %patch49 -p0 -b .workspace.impress178.patch
 %patch50 -p0 -b .ooo106130.svx.removedeletedshapes.patch
+%patch51 -p1 -b .workspace.gsminhibit.patch
 
 %build
 echo build start time is `date`, diskspace: `df -h . | tail -n 1`
@@ -4131,9 +4133,10 @@ fi
     unopkg list --shared > /dev/null 2>&1 || :
 
 %changelog
-* Wed Oct 21 2009 Caolán McNamara <caolanm at redhat.com> - 1:3.2.0-2.5.UNBUILT
+* Wed Oct 28 2009 Caolán McNamara <caolanm at redhat.com> - 1:3.2.0-2.5
 - Resolves: ooo#103757 custom shape cut and paste (caolanm)
 - Resolves: rhbz#529746 crash on exit after loading .ppt (caolanm)
+- add workspace.gsminhibit.patch for new g-s-m api-de-jour inhibit (caolanm)
 
 * Mon Oct 19 2009 Caolán McNamara <caolanm at redhat.com> - 1:3.2.0-2.4
 - Resolves: rhbz#521460 add openoffice.org-3.2.0.ooo106032.linguistic.defaulttoplain.patch (caolanm)




More information about the fedora-extras-commits mailing list