ooo-build r12927 - in branches/ooo-build-2-4-1: . patches/src680



Author: thorstenb
Date: Thu Jun 19 15:34:06 2008
New Revision: 12927
URL: http://svn.gnome.org/viewvc/ooo-build?rev=12927&view=rev

Log:
	* patches/src680/vcl-linking-randr.diff: removed
	* patches/src680/vcl-fix-randr-heapcorruption.diff:
	* patches/src680/apply: added better fix for the RandR crashes
	(turned out to be a heap corruption in libXrandr, now avoiding to
	trigger that)



Added:
   branches/ooo-build-2-4-1/patches/src680/vcl-fix-randr-heapcorruption.diff
Removed:
   branches/ooo-build-2-4-1/patches/src680/vcl-linking-randr.diff
Modified:
   branches/ooo-build-2-4-1/ChangeLog
   branches/ooo-build-2-4-1/patches/src680/apply

Modified: branches/ooo-build-2-4-1/patches/src680/apply
==============================================================================
--- branches/ooo-build-2-4-1/patches/src680/apply	(original)
+++ branches/ooo-build-2-4-1/patches/src680/apply	Thu Jun 19 15:34:06 2008
@@ -2467,4 +2467,4 @@
 
 [ Fixes ]
 cppcanvas-fix-roundcorners.diff, i#361534, rodo
-vcl-linking-randr.diff, i#89718, n#398244, thorsten
+vcl-fix-randr-heapcorruption.diff, i#89718, n#398244, thorsten

Added: branches/ooo-build-2-4-1/patches/src680/vcl-fix-randr-heapcorruption.diff
==============================================================================
--- (empty file)
+++ branches/ooo-build-2-4-1/patches/src680/vcl-fix-randr-heapcorruption.diff	Thu Jun 19 15:34:06 2008
@@ -0,0 +1,64 @@
+ vcl/unx/source/app/randrwrapper.cxx |   15 ++++++++++++---
+ 1 files changed, 12 insertions(+), 3 deletions(-)
+
+diff --git a/vcl/unx/source/app/randrwrapper.cxx b/vcl/unx/source/app/randrwrapper.cxx
+index 10ec921..b42b8fe 100644
+--- vcl/unx/source/app/randrwrapper.cxx
++++ vcl/unx/source/app/randrwrapper.cxx
+@@ -58,7 +58,8 @@ class RandRWrapper
+     XRRScreenSize*(*m_pXRRSizes)(Display*,int,int*);
+     XRRScreenSize*(*m_pXRRConfigSizes)(XRRScreenConfiguration*,int*);
+     SizeID(*m_pXRRConfigCurrentConfiguration)(XRRScreenConfiguration*,Rotation*);
+-    
++    int(*m_pXRRRootToScreen)(Display*, XLIB_Window);
++
+     bool m_bValid;
+     
+     void initFromModule();
+@@ -110,6 +111,10 @@ public:
+     {
+         return m_bValid ? m_pXRRConfigCurrentConfiguration( i_pConfig, o_pRot ) : 0;
+     }
++    int XRRRootToScreen( Display *dpy, XLIB_Window root )
++    {
++        return m_bValid ? m_pXRRRootToScreen( dpy, root ) : -1;
++    }
+ };
+ }
+ 
+@@ -124,6 +129,7 @@ void RandRWrapper::initFromModule()
+     m_pXRRSizes = (XRRScreenSize*(*)(Display*,int,int*))osl_getAsciiFunctionSymbol( m_pRandRLib, "XRRSizes" );
+     m_pXRRConfigSizes = (XRRScreenSize*(*)(XRRScreenConfiguration*,int*))osl_getAsciiFunctionSymbol( m_pRandRLib, "XRRConfigSizes" );
+     m_pXRRConfigCurrentConfiguration = (SizeID(*)(XRRScreenConfiguration*,Rotation*))osl_getAsciiFunctionSymbol( m_pRandRLib, "XRRConfigCurrentConfiguration" );
++    m_pXRRRootToScreen = (int(*)(Display*,XLIB_Window))osl_getAsciiFunctionSymbol( m_pRandRLib, "XRRRootToScreen" );
+     
+     m_bValid = m_pXRRQueryExtension             &&
+                m_pXRRQueryVersion               &&
+@@ -133,7 +139,8 @@ void RandRWrapper::initFromModule()
+                m_pXRRUpdateConfiguration        &&
+                m_pXRRSizes                      &&
+                m_pXRRConfigSizes                &&
+-               m_pXRRConfigCurrentConfiguration
++               m_pXRRConfigCurrentConfiguration &&
++               m_pXRRRootToScreen
+                ;
+ }
+ 
+@@ -148,6 +155,7 @@ RandRWrapper::RandRWrapper( Display* pDisplay ) :
+         m_pXRRSizes( NULL ),
+         m_pXRRConfigSizes( NULL ),
+         m_pXRRConfigCurrentConfiguration( NULL ),
++        m_pXRRRootToScreen( NULL ),
+         m_bValid( false )
+ {
+     // first try in process space (e.g. gtk links that ?)
+@@ -211,7 +219,8 @@ int SalDisplay::processRandREvent( XEvent* pEvent )
+ {
+     int nRet = 0;
+     #ifdef USE_RANDR
+-    if( pWrapper )
++    XConfigureEvent* pCnfEvent=(XConfigureEvent*)pEvent;
++    if( pWrapper && pWrapper->XRRRootToScreen(GetDisplay(),pCnfEvent->window) != -1 )
+     {
+         nRet = pWrapper->XRRUpdateConfiguration( pEvent );
+         if( nRet == 1 && pEvent->type != ConfigureNotify) // this should then be a XRRScreenChangeNotifyEvent



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]