rpms/openoffice.org/devel openoffice.org-3.3.0.ooo112421.vcl.defaultmonitor.patch, 1.1, 1.2

Caolan McNamara caolanm at fedoraproject.org
Wed Jun 16 07:51:01 UTC 2010


Author: caolanm

Update of /cvs/pkgs/rpms/openoffice.org/devel
In directory cvs01.phx2.fedoraproject.org:/tmp/cvs-serv11611

Modified Files:
	openoffice.org-3.3.0.ooo112421.vcl.defaultmonitor.patch 
Log Message:
fixup patch

openoffice.org-3.3.0.ooo112421.vcl.defaultmonitor.patch:
 gtk/app/gtkdata.cxx         |   32 +++++++++++++++++++++++++++++++-
 inc/plugins/gtk/gtkdata.hxx |    2 ++
 inc/saldisp.hxx             |    4 +++-
 source/app/saldisp.cxx      |   22 +++++++++++++---------
 source/app/salsys.cxx       |    2 +-
 5 files changed, 50 insertions(+), 12 deletions(-)

Index: openoffice.org-3.3.0.ooo112421.vcl.defaultmonitor.patch
===================================================================
RCS file: /cvs/pkgs/rpms/openoffice.org/devel/openoffice.org-3.3.0.ooo112421.vcl.defaultmonitor.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- openoffice.org-3.3.0.ooo112421.vcl.defaultmonitor.patch	15 Jun 2010 19:12:22 -0000	1.1
+++ openoffice.org-3.3.0.ooo112421.vcl.defaultmonitor.patch	16 Jun 2010 07:51:01 -0000	1.2
@@ -1,7 +1,7 @@
 diff -ru vcl.orig/unx/gtk/app/gtkdata.cxx vcl/unx/gtk/app/gtkdata.cxx
 --- vcl.orig/unx/gtk/app/gtkdata.cxx	2010-06-14 19:51:39.500810695 +0100
 +++ vcl/unx/gtk/app/gtkdata.cxx	2010-06-15 10:07:16.669799057 +0100
-@@ -220,12 +220,12 @@
+@@ -217,11 +217,12 @@
              {
                  gint nMonitors = gdk_screen_get_n_monitors(pScreen);
                  m_aXineramaScreens = std::vector<Rectangle>();
@@ -10,13 +10,12 @@ diff -ru vcl.orig/unx/gtk/app/gtkdata.cx
                  {
                      GdkRectangle dest;
                      gdk_screen_get_monitor_geometry(pScreen, i, &dest);
--                    m_aXineramaScreens.push_back( Rectangle( Point(dest.x,
--                                                                   dest.y ), Size( dest.width, dest.height ) ) );
+-                    addXineramaScreenUnique( dest.x, dest.y, dest.width, dest.height );
 +                    addXineramaScreenUnique( i, dest.x, dest.y, dest.width, dest.height );
                  }
                  m_bXinerama = m_aXineramaScreens.size() > 1;
                  if( ! m_aFrames.empty() )
-@@ -239,6 +239,35 @@
+@@ -235,6 +236,35 @@
      }
  }
  
@@ -67,7 +66,7 @@ diff -ru vcl.orig/unx/inc/plugins/gtk/gt
 diff -ru vcl.orig/unx/inc/saldisp.hxx vcl/unx/inc/saldisp.hxx
 --- vcl.orig/unx/inc/saldisp.hxx	2010-06-14 19:51:39.548798785 +0100
 +++ vcl/unx/inc/saldisp.hxx	2010-06-15 10:06:53.031798755 +0100
-@@ -392,6 +392,7 @@
+@@ -389,6 +389,7 @@
  
      bool			m_bXinerama;
      std::vector< Rectangle > m_aXineramaScreens;
@@ -75,15 +74,16 @@ diff -ru vcl.orig/unx/inc/saldisp.hxx vc
      std::list<SalFrame*> m_aFrames;
      std::list<SalObject*> m_aSalObjects;
      
-@@ -407,6 +408,7 @@
+@@ -404,7 +405,7 @@
      int             processRandREvent( XEvent* );
  
      void			doDestruct();
+-    void            addXineramaScreenUnique( long i_nX, long i_nY, long i_nWidth, long i_nHeight );
 +    void            addXineramaScreenUnique( int i, long i_nX, long i_nY, long i_nWidth, long i_nHeight );
  public:
  	static	SalDisplay	   *GetSalDisplay( Display* display );
  	static	BOOL			BestVisual( Display     *pDisp,
-@@ -476,6 +478,7 @@
+@@ -474,6 +475,7 @@
  	XLIB_Window		GetDrawable( int nScreen ) const { return getDataForScreen( nScreen ).m_aRefWindow; }
  	Display		   *GetDisplay() const { return pDisp_; }
  	int				GetDefaultScreenNumber() const { return m_nDefaultScreen; }
@@ -94,7 +94,7 @@ diff -ru vcl.orig/unx/inc/saldisp.hxx vc
 diff -ru vcl.orig/unx/source/app/saldisp.cxx vcl/unx/source/app/saldisp.cxx
 --- vcl.orig/unx/source/app/saldisp.cxx	2010-06-14 19:51:39.516798973 +0100
 +++ vcl/unx/source/app/saldisp.cxx	2010-06-15 10:12:39.627798619 +0100
-@@ -65,9 +65,7 @@
+@@ -62,9 +62,7 @@
  
  #ifdef USE_XINERAMA
  #ifdef USE_XINERAMA_XORG
@@ -104,38 +104,29 @@ diff -ru vcl.orig/unx/source/app/saldisp
  #elif defined USE_XINERAMA_XSUN
  #if defined(SOLARIS) && defined(INTEL) // missing extension header in standard installation
  #define MAXFRAMEBUFFERS       16
-@@ -2600,6 +2598,30 @@
+@@ -2597,7 +2595,7 @@
               sal::static_int_cast< unsigned int >(GetVisual(m_nDefaultScreen).GetVisualId()) );
  }
  
+-void SalDisplay::addXineramaScreenUnique( long i_nX, long i_nY, long i_nWidth, long i_nHeight )
 +void SalDisplay::addXineramaScreenUnique( int i, long i_nX, long i_nY, long i_nWidth, long i_nHeight )
-+{
-+    // see if any frame buffers are at the same coordinates
-+    // this can happen with weird configuration e.g. on
-+    // XFree86 and Clone displays
-+    const size_t nScreens = m_aXineramaScreens.size();
-+    for( size_t n = 0; n < nScreens; n++ )
-+    {
-+        if( m_aXineramaScreens[n].Left() == i_nX &&
-+            m_aXineramaScreens[n].Top() == i_nY )
-+        {
-+            if( m_aXineramaScreens[n].GetWidth() < i_nWidth ||
-+                m_aXineramaScreens[n].GetHeight() < i_nHeight )
-+            {
-+                m_aXineramaScreens[n].SetSize( Size( i_nWidth, i_nHeight ) );
+ {
+     // see if any frame buffers are at the same coordinates
+     // this can happen with weird configuration e.g. on
+@@ -2612,10 +2610,12 @@
+                 m_aXineramaScreens[n].GetHeight() < i_nHeight )
+             {
+                 m_aXineramaScreens[n].SetSize( Size( i_nWidth, i_nHeight ) );
 +                m_aXineramaScreenIndexMap[i] = n;
-+            }
-+            return;
-+        }
-+    }
+             }
+             return;
+         }
+     }
 +    m_aXineramaScreenIndexMap[i] = m_aXineramaScreens.size();
-+    m_aXineramaScreens.push_back( Rectangle( Point( i_nX, i_nY ), Size( i_nWidth, i_nHeight ) ) );
-+}
-+
- void SalDisplay::InitXinerama()
- {
-     if( m_aScreens.size() > 1 )
-@@ -2622,16 +2644,16 @@
+     m_aXineramaScreens.push_back( Rectangle( Point( i_nX, i_nY ), Size( i_nWidth, i_nHeight ) ) );
+ }
+ 
+@@ -2641,16 +2641,16 @@
          if( result > 0 && nFramebuffers > 1 )
          {
              m_bXinerama = true;
@@ -143,14 +134,11 @@ diff -ru vcl.orig/unx/source/app/saldisp
 +            m_aXineramaScreens = std::vector<Rectangle>();
 +            m_aXineramaScreenIndexMap = std::vector<int>(nFramebuffers);
              for( int i = 0; i < nFramebuffers; i++ )
--                m_aXineramaScreens[i] = Rectangle( Point( pFramebuffers[i].x,
--                                                   pFramebuffers[i].y ),
--                                            Size( pFramebuffers[i].width,
--                                                  pFramebuffers[i].height ) );
+-                addXineramaScreenUnique( pFramebuffers[i].x,
 +                addXineramaScreenUnique( i, pFramebuffers[i].x,
-+                                         pFramebuffers[i].y,
-+                                         pFramebuffers[i].width,
-+                                         pFramebuffers[i].height );
+                                          pFramebuffers[i].y,
+                                          pFramebuffers[i].width,
+                                          pFramebuffers[i].height );
          }
      }
  #elif defined(USE_XINERAMA_XORG)
@@ -158,45 +146,19 @@ diff -ru vcl.orig/unx/source/app/saldisp
  if( XineramaIsActive( pDisp_ ) )
  {
      int nFramebuffers = 1;
-@@ -2641,32 +2663,13 @@
+@@ -2660,9 +2660,10 @@
          if( nFramebuffers > 1 )
          {
              m_aXineramaScreens = std::vector<Rectangle>();
 +            m_aXineramaScreenIndexMap = std::vector<int>(nFramebuffers);
              for( int i = 0; i < nFramebuffers; i++ )
              {
--                // see if any frame buffers are at the same coordinates
--                // this can happen with weird configuration e.g. on
--                // XFree86 and Clone displays
--                bool bDuplicate = false;
--                for( int n = 0; n < i; n++ )
--                {
--                    if( m_aXineramaScreens[n].Left() == pScreens[i].x_org &&
--                        m_aXineramaScreens[n].Top() == pScreens[i].y_org )
--                    {
--                        bDuplicate = true;
--                        if( m_aXineramaScreens[n].GetWidth() < pScreens[i].width ||
--                            m_aXineramaScreens[n].GetHeight() < pScreens[i].height )
--                        {
--                            m_aXineramaScreens[n].SetSize( Size( pScreens[i].width,
--                                                                 pScreens[i].height ) );
--                        }
--                        break;
--                    }
--                }
--                if( ! bDuplicate )
--                    m_aXineramaScreens.push_back( Rectangle( Point( pScreens[i].x_org,
--                                                                    pScreens[i].y_org ),
--                                                             Size( pScreens[i].width,
--                                                                   pScreens[i].height ) ) );
+-                addXineramaScreenUnique( pScreens[i].x_org,
 +                addXineramaScreenUnique( i, pScreens[i].x_org,
-+                                         pScreens[i].y_org,
-+                                         pScreens[i].width,
-+                                         pScreens[i].height );
-             }
-             m_bXinerama = m_aXineramaScreens.size() > 1;
-         }
-@@ -2674,7 +2677,6 @@
+                                          pScreens[i].y_org,
+                                          pScreens[i].width,
+                                          pScreens[i].height );
+@@ -2673,17 +2674,20 @@
      }
  }
  #endif
@@ -204,7 +166,10 @@ diff -ru vcl.orig/unx/source/app/saldisp
  #if OSL_DEBUG_LEVEL > 1
      if( m_bXinerama )
      {
-@@ -2685,6 +2687,11 @@
+         for( std::vector< Rectangle >::const_iterator it = m_aXineramaScreens.begin(); it != m_aXineramaScreens.end(); ++it )
+             fprintf( stderr, "Xinerama screen: %ldx%ld+%ld+%ld\n", it->GetWidth(), it->GetHeight(), it->Left(), it->Top() );
+     }
+-#endif
  #endif // USE_XINERAMA
  }
  



More information about the scm-commits mailing list