rpms/openoffice.org/F-10 openoffice.org-3.1.0.ooo101379.vcl.qstart.SM.patch, NONE, 1.1 openoffice.org.spec, 1.1728, 1.1729

Caolan McNamara caolanm at fedoraproject.org
Mon Apr 27 14:08:29 UTC 2009


Author: caolanm

Update of /cvs/pkgs/rpms/openoffice.org/F-10
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv16960/F-10

Modified Files:
	openoffice.org.spec 
Added Files:
	openoffice.org-3.1.0.ooo101379.vcl.qstart.SM.patch 
Log Message:
Resolves: rhbz#491159 openoffice.org-3.1.0.ooo101379.vcl.qstart.SM.patch

openoffice.org-3.1.0.ooo101379.vcl.qstart.SM.patch:

--- NEW FILE openoffice.org-3.1.0.ooo101379.vcl.qstart.SM.patch ---
diff -ru vcl.orig/unx/source/app/sm.cxx vcl/unx/source/app/sm.cxx
--- vcl.orig/unx/source/app/sm.cxx	2009-04-27 08:31:01.000000000 +0100
+++ vcl/unx/source/app/sm.cxx	2009-04-27 14:38:55.000000000 +0100
@@ -48,6 +48,7 @@
 #include <saldisp.hxx>
 #include <salframe.h>
 #include <vcl/svapp.hxx>
+#include <vcl/window.hxx>
 #include <salinst.h>
 
 #include <osl/conditn.h>
@@ -187,6 +188,7 @@
 static SmProp*	pSmProps = NULL;
 static SmProp**	ppSmProps = NULL;
 static int		nSmProps = 0;
+static unsigned char   *pSmRestartHint = NULL;
 
 
 static void BuildSmPropertyList()
@@ -195,7 +197,7 @@
 	{
 		ByteString aExec( SessionManagerClient::getExecName(), osl_getThreadTextEncoding() );
 
-		nSmProps = 4;
+		nSmProps = 5;
 		pSmProps = new SmProp[ nSmProps ];
 
 		pSmProps[ 0 ].name		= const_cast<char*>(SmCloneCommand);
@@ -243,6 +245,15 @@
 		pSmProps[ 3 ].vals->value	= strdup( aUser.getStr() );
 		pSmProps[ 3 ].vals->length	= strlen( (char *)pSmProps[ 3 ].vals->value )+1;
 
+		pSmProps[ 4 ].name		= const_cast<char*>(SmRestartStyleHint);
+		pSmProps[ 4 ].type		= const_cast<char*>(SmCARD8);
+		pSmProps[ 4 ].num_vals	= 1;
+		pSmProps[ 4 ].vals		= new SmPropValue;
+		pSmProps[ 4 ].vals->value	= malloc(1);
+		pSmRestartHint = (unsigned char *)pSmProps[ 4 ].vals->value;
+		*pSmRestartHint = SmRestartIfRunning;
+		pSmProps[ 4 ].vals->length	= 1;
+
 		ppSmProps = new SmProp*[ nSmProps ];
 		for( int i = 0; i < nSmProps; i++ )
 			ppSmProps[ i ] = &pSmProps[i];
@@ -257,6 +268,31 @@
 IMPL_STATIC_LINK( SessionManagerClient, SaveYourselfHdl, void*, EMPTYARG )
 {
     SMprintf( "posting save documents event shutdown = %s\n", (pThis!=0) ? "true" : "false" );
+
+    static bool bFirstShutdown=true;
+    if (pThis != 0 && bFirstShutdown) //first shutdown request
+    {
+        bFirstShutdown = false;
+        /*
+          If we have no actual frames open, e.g. we launched a quickstarter,
+          and then shutdown all our frames leaving just a quickstarter running,
+          then we don't want to launch an empty toplevel frame on the next 
+          start. (The job of scheduling the restart of the quick-starter is a 
+          task of the quick-starter)
+        */
+        *pSmRestartHint = SmRestartNever;
+        const std::list< SalFrame* >& rFrames = GetX11SalData()->GetDisplay()->getFrames();
+        for( std::list< SalFrame* >::const_iterator it = rFrames.begin(); it != rFrames.end(); ++it )
+        {
+            Window *pWindow = (*it)->GetWindow();
+            if (pWindow && pWindow->IsVisible())
+            {
+                *pSmRestartHint = SmRestartIfRunning;
+                break;
+            }
+        }
+    }
+
     if( pOneInstance )
     {
         SalSessionSaveRequestEvent aEvent( pThis != 0, false );
@@ -385,7 +421,7 @@
         ICEConnectionObserver::lock();
         SmcSetProperties( aSmcConnection, nSmProps, ppSmProps );
         SmcSaveYourselfDone( aSmcConnection, True );
-        SMprintf( "sent SaveYourselfDone\n" );
+        SMprintf( "sent SaveYourselfDone SmRestartHint of %d\n", *pSmRestartHint );
         bDocSaveDone = true;
         ICEConnectionObserver::unlock();
     }


Index: openoffice.org.spec
===================================================================
RCS file: /cvs/pkgs/rpms/openoffice.org/F-10/openoffice.org.spec,v
retrieving revision 1.1728
retrieving revision 1.1729
diff -u -r1.1728 -r1.1729
--- openoffice.org.spec	27 Apr 2009 05:55:56 -0000	1.1728
+++ openoffice.org.spec	27 Apr 2009 14:07:59 -0000	1.1729
@@ -148,6 +148,7 @@
 Patch75: openoffice.org-3.1.0.ooo101145.vcl.safe.dpi.patch
 Patch76: openoffice.org-3.0.1.oooXXXXX.sfx2.badexception.patch
 Patch77: openoffice.org-3.1.0.ooo101354.filter.xhtml.do-not-label-list-headers.patch
+Patch78: openoffice.org-3.1.0.ooo101379.vcl.qstart.SM.patch
 
 %define instdir %{_libdir}
 %define baseinstdir %{instdir}/openoffice.org
@@ -1419,6 +1420,7 @@
 %patch74 -p1 -b .ooo100942.svtools.oversafeemf.patch
 %patch76 -p1 -b .oooXXXXX.sfx2.badexception.patch
 %patch77 -p0 -b .ooo101354.filter.xhtml.do-not-label-list-headers.patch
+%patch78 -p0 -b .ooo101379.vcl.qstart.SM.patch
 
 %build
 echo build start time is `date`, diskspace: `df -h . | tail -n 1`
@@ -2023,6 +2025,8 @@
 echo "TryExec=oodraw" >> draw.desktop
 # rh#156677# / rh#186515#
 echo "NoDisplay=true" >> math.desktop
+# rhbz#491159 temporarily remove NoDisplay=true from qstart.desktop
+sed -i -e "/NoDisplay=true/d" qstart.desktop
 # relocate the .desktop and icon files
 mkdir -p $RPM_BUILD_ROOT/%{_datadir}/applications
 cp -p base.desktop $RPM_BUILD_ROOT/%{_datadir}/applications/openoffice.org-1.9-base.desktop
@@ -2084,6 +2088,8 @@
 echo "StartupNotify=true" >> draw.desktop
 # rh#156677# / rh#186515#
 echo "NoDisplay=true" >> math.desktop
+# rhbz#491159 temporarily remove NoDisplay=true from qstart.desktop
+sed -i -e "/NoDisplay=true/d" qstart.desktop
 # relocate the .desktop and icon files
 mkdir -p $RPM_BUILD_ROOT/%{_datadir}/applications
 cp -p base.desktop $RPM_BUILD_ROOT/%{_datadir}/applications/broffice.org-base.desktop
@@ -3785,11 +3791,12 @@
     unopkg list --shared > /dev/null 2>&1 || :
 
 %changelog
-* Tue Apr 21 2009 Caolán McNamara <caolanm at redhat.com> - 1:3.0.1-15.4-UNRELEASED
+* Mon Apr 27 2009 Caolán McNamara <caolanm at redhat.com> - 1:3.0.1-15.4-UNRELEASED
 - Resolves: rhbz#494643 EMF polypolygons issue
 - Resolves: rhbz#495840 openoffice.org-3.1.0.ooo101145.vcl.safe.dpi.patch
 - Resolves: rhbz#496315 openoffice.org-3.0.1.oooXXXXX.sfx2.badexception.patch
 - Resolves: rhbz#484177 openoffice.org-3.1.0.ooo101354.filter.xhtml.do-not-label-list-headers.patch
+- Resolves: rhbz#491159 openoffice.org-3.1.0.ooo101379.vcl.qstart.SM.patch
 
 * Mon Mar 09 2009 Caolán McNamara <caolanm at redhat.com> - 1:3.0.1-15.3
 - Resolves: rhbz#483223 openoffice.org-3.0.1.ooo98649.svtools.missingUI.patch




More information about the scm-commits mailing list