ooo-build r12934 - in trunk: . patches/dev300



Author: thorstenb
Date: Fri Jun 20 14:11:55 2008
New Revision: 12934
URL: http://svn.gnome.org/viewvc/ooo-build?rev=12934&view=rev

Log:
	* patches/dev300/vcl-linking-randr.diff: added the workaround for
	the RandR heap clobberage



Modified:
   trunk/ChangeLog
   trunk/patches/dev300/vcl-linking-randr.diff

Modified: trunk/patches/dev300/vcl-linking-randr.diff
==============================================================================
--- trunk/patches/dev300/vcl-linking-randr.diff	(original)
+++ trunk/patches/dev300/vcl-linking-randr.diff	Fri Jun 20 14:11:55 2008
@@ -1,10 +1,10 @@
- config_office/configure.in          |   57 ++++++++++++++--------
+ config_office/configure.in          |   57 ++++++++++++-------
  config_office/set_soenv.in          |    3 +
- vcl/unx/source/app/makefile.mk      |    5 ++
- vcl/unx/source/app/randrwrapper.cxx |   90 ++++++++++++++++++++++++++++++++++-
+ vcl/unx/source/app/makefile.mk      |    5 +-
+ vcl/unx/source/app/randrwrapper.cxx |  107 ++++++++++++++++++++++++++++++++++-
  vcl/unx/source/app/saldisp.cxx      |    6 +-
- vcl/util/makefile.mk                |   21 ++++++++
- 6 files changed, 154 insertions(+), 28 deletions(-)
+ vcl/util/makefile.mk                |   21 +++++++
+ 6 files changed, 169 insertions(+), 30 deletions(-)
 
 diff --git a/config_office/configure.in b/config_office/configure.in
 index 8b8e6cf..232ffc3 100644
@@ -128,7 +128,7 @@
  .ENDIF
  
 diff --git a/vcl/unx/source/app/randrwrapper.cxx b/vcl/unx/source/app/randrwrapper.cxx
-index 9b9b347..aceeacb 100644
+index 9b9b347..5cb510e 100644
 --- vcl/unx/source/app/randrwrapper.cxx
 +++ vcl/unx/source/app/randrwrapper.cxx
 @@ -40,6 +40,9 @@
@@ -141,15 +141,54 @@
  class RandRWrapper
  {
      oslModule m_pRandRLib;
-@@ -107,7 +110,6 @@ public:
+@@ -54,6 +57,7 @@ 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;
+     
+@@ -106,8 +110,11 @@ 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;
++    }
  };
 -}
  
  void RandRWrapper::initFromModule()
  {
-@@ -183,8 +185,89 @@ void RandRWrapper::releaseWrapper()
+@@ -120,6 +127,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               &&
+@@ -129,7 +137,8 @@ void RandRWrapper::initFromModule()
+                m_pXRRUpdateConfiguration        &&
+                m_pXRRSizes                      &&
+                m_pXRRConfigSizes                &&
+-               m_pXRRConfigCurrentConfiguration
++               m_pXRRConfigCurrentConfiguration &&
++               m_pXRRRootToScreen
+                ;
+ }
+ 
+@@ -144,6 +153,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 ?)
+@@ -183,8 +193,93 @@ void RandRWrapper::releaseWrapper()
      pWrapper = NULL;
  }
  
@@ -206,13 +245,17 @@
 +    {
 +        return m_bValid ? ::XRRConfigCurrentConfiguration( i_pConfig, o_pRot ) : 0;
 +    }
++    int XRRRootToScreen( Display *dpy, XLIB_Window root )
++    {
++        return m_bValid ? ::XRRRootToScreen( dpy, root ) : -1;
++    }
 +};
 +
 +RandRWrapper::RandRWrapper( Display* pDisplay ) :
-+    m_bValid( false )
++    m_bValid( true )
 +{
 +    int nEventBase = 0, nErrorBase = 0;
-+    if( ! XRRQueryExtension( pDisplay, &nEventBase, &nErrorBase ) )
++    if( !XRRQueryExtension( pDisplay, &nEventBase, &nErrorBase ) )
 +        m_bValid = false;
 +}
 +
@@ -240,7 +283,7 @@
  #include "saldisp.hxx"
  
  void SalDisplay::InitRandR( XLIB_Window aRoot ) const
-@@ -200,6 +283,9 @@ void SalDisplay::DeInitRandR()
+@@ -200,6 +295,9 @@ void SalDisplay::DeInitRandR()
  {
      #ifdef USE_RANDR
      RandRWrapper::releaseWrapper();
@@ -250,6 +293,16 @@
      #endif
  }
  
+@@ -207,7 +305,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
 diff --git a/vcl/unx/source/app/saldisp.cxx b/vcl/unx/source/app/saldisp.cxx
 index fe852d8..2960711 100644
 --- vcl/unx/source/app/saldisp.cxx



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