rpms/openoffice.org/devel workspace.vcl104.patch, NONE, 1.1 openoffice.org.spec, 1.1992, 1.1993 openoffice.org-3.1.0.ooo101379.vcl.qstart.SM.patch, 1.1, NONE

Caolan McNamara caolanm at fedoraproject.org
Tue Aug 25 11:41:23 UTC 2009


Author: caolanm

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

Modified Files:
	openoffice.org.spec 
Added Files:
	workspace.vcl104.patch 
Removed Files:
	openoffice.org-3.1.0.ooo101379.vcl.qstart.SM.patch 
Log Message:
rename to accepted workspace

workspace.vcl104.patch:
 sm.cxx |   40 ++++++++++++++++++++++++++++++++++++++--
 1 file changed, 38 insertions(+), 2 deletions(-)

--- NEW FILE workspace.vcl104.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/devel/openoffice.org.spec,v
retrieving revision 1.1992
retrieving revision 1.1993
diff -u -p -r1.1992 -r1.1993
--- openoffice.org.spec	24 Aug 2009 14:50:36 -0000	1.1992
+++ openoffice.org.spec	25 Aug 2009 11:41:23 -0000	1.1993
@@ -136,7 +136,7 @@ Patch58: openoffice.org-3.1.0.ooo90439.s
 Patch59: openoffice.org-3.1.0.ooo101274.opening-a-directory.patch
 Patch60: openoffice.org-3.1.0.ooo101354.filter.xhtml.do-not-label-list-headers.patch
 Patch61: openoffice.org-3.1.0.ooo101355.filter.no-variables-in-keys.patch
-Patch62: openoffice.org-3.1.0.ooo101379.vcl.qstart.SM.patch
+Patch62: workspace.vcl104.patch
 Patch63: workspace.evoab2def.patch
 Patch64: workspace.cmcfixes59.patch
 Patch65: workspace.impress174.patch
@@ -1677,7 +1677,7 @@ cat %{PATCH11} >> svtools/source/dialogs
 %patch59 -p0 -b .ooo101274.opening-a-directory.patch
 %patch60 -p0 -b .ooo101354.filter.xhtml.do-not-label-list-headers.patch
 %patch61 -p0 -b .ooo101355.filter.no-variables-in-keys.patch
-%patch62 -p0 -b .ooo101379.vcl.qstart.SM.patch
+%patch62 -p0 -b .workspace.vcl104.patch
 %patch63 -p0 -b .workspace.evoab2def.patch
 %patch64 -p0 -b .workspace.cmcfixes59.patch
 %patch65 -p0 -b .workspace.impress174.patch


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




More information about the fedora-extras-commits mailing list