[ooo-build-commit] 3 commits - patches/dev300

Thorsten Behrens thorsten at kemper.freedesktop.org
Thu Nov 26 07:27:06 PST 2009


 patches/dev300/apply                             |    4 
 patches/dev300/ooo59127.vcl.honourcairofont.diff |    6 -
 patches/dev300/vcl-free-renderpicture.diff       |   78 +++++++++++++++
 patches/dev300/vcl-fullscreenmode-fix.diff       |  114 +++++++++++++++++++++++
 4 files changed, 199 insertions(+), 3 deletions(-)

New commits:
commit 10c0d65b6041824a1f4f67f606a2f250b64a0737
Author: Thorsten Behrens <tbehrens at novell.com>
Date:   Thu Nov 26 16:20:48 2009 +0100

    Fix vcl's fullscreen WM hints (fix prob on multimonitor setups)
    
    * patches/dev300/apply: added patch
    * patches/dev300/vcl-fullscreenmode-fix.diff: so removed a bunch of
      quirks that were added over time to circumvent buggy WM behaviour
      in the case of xinerama/multi-monitor; now we're using plain-simple
      _NET_WM_STATE_FULLSCREEN state & size and position the window
      correctly initially. Fixes bug n#551402.

diff --git a/patches/dev300/apply b/patches/dev300/apply
index d13ed69..f2f1d6c 100644
--- a/patches/dev300/apply
+++ b/patches/dev300/apply
@@ -3402,6 +3402,8 @@ ppt-customshape-shading-fix.diff, i#102797, thorsten
 psprint-bezier-fix.diff, n#553219, thorsten
 # fix RenderBadPicture crash in xinerama cases
 vcl-free-renderpicture.diff, thorsten
+# fix fullscreen window manager hints
+vcl-fullscreenmode-fix.diff, n#551402, thorsten
 
 [ NLPSolverBits ]
 # build NLPSolver extension when enabled (fate#304653)
diff --git a/patches/dev300/vcl-fullscreenmode-fix.diff b/patches/dev300/vcl-fullscreenmode-fix.diff
new file mode 100644
index 0000000..079a8c8
--- /dev/null
+++ b/patches/dev300/vcl-fullscreenmode-fix.diff
@@ -0,0 +1,114 @@
+Fix fullscreen behaviour on multimonitor setups
+
+From: Thorsten Behrens <thb at openoffice.org>
+
+
+---
+
+ vcl/unx/gtk/window/gtkframe.cxx    |   13 +------------
+ vcl/unx/source/window/salframe.cxx |   25 -------------------------
+ 2 files changed, 1 insertions(+), 37 deletions(-)
+
+
+diff --git vcl/unx/gtk/window/gtkframe.cxx vcl/unx/gtk/window/gtkframe.cxx
+index 3cc1c44..3d0defa 100644
+--- vcl/unx/gtk/window/gtkframe.cxx
++++ vcl/unx/gtk/window/gtkframe.cxx
+@@ -842,12 +842,6 @@ void GtkSalFrame::Init( SalFrame* pParent, ULONG nStyle )
+             eType = GDK_WINDOW_TYPE_HINT_UTILITY;
+         }
+         
+-        if( (nStyle & SAL_FRAME_STYLE_PARTIAL_FULLSCREEN ) )
+-        {
+-            eType = GDK_WINDOW_TYPE_HINT_TOOLBAR;
+-            gtk_window_set_keep_above( GTK_WINDOW(m_pWindow), true );
+-        }
+-        
+         gtk_window_set_type_hint( GTK_WINDOW(m_pWindow), eType );
+         if( bNoDecor )
+             gtk_window_set_decorated( GTK_WINDOW(m_pWindow), FALSE );
+@@ -1308,8 +1302,6 @@ void GtkSalFrame::Show( BOOL bVisible, BOOL bNoActivate )
+ {
+     if( m_pWindow )
+     {
+-        if( m_pParent && (m_pParent->m_nStyle & SAL_FRAME_STYLE_PARTIAL_FULLSCREEN) )
+-            gtk_window_set_keep_above( GTK_WINDOW(m_pWindow), bVisible );
+         if( bVisible )
+         {
+             SessionManagerClient::open(); // will simply return after the first time
+@@ -1820,8 +1812,6 @@ void GtkSalFrame::ShowFullScreen( BOOL bFullScreen, sal_Int32 nScreen )
+             {
+                 m_aRestorePosSize = Rectangle( Point( maGeometry.nX, maGeometry.nY ),
+                                                Size( maGeometry.nWidth, maGeometry.nHeight ) );
+-                // workaround different window managers have different opinions about
+-                // _NET_WM_STATE_FULLSCREEN (Metacity <-> KWin)
+                 bool bVisible = GTK_WIDGET_MAPPED(m_pWindow);
+                 if( bVisible )
+                     Show( FALSE );
+@@ -1838,6 +1828,7 @@ void GtkSalFrame::ShowFullScreen( BOOL bFullScreen, sal_Int32 nScreen )
+                 gtk_window_move( GTK_WINDOW(m_pWindow),
+                                  maGeometry.nX = aNewPosSize.Left(),
+                                  maGeometry.nY = aNewPosSize.Top() );
++                gtk_window_fullscreen( GTK_WINDOW(m_pWindow) );
+                 if( bVisible )
+                     Show( TRUE );
+             }
+@@ -1866,8 +1857,6 @@ void GtkSalFrame::ShowFullScreen( BOOL bFullScreen, sal_Int32 nScreen )
+         {
+             if( bFullScreen )
+             {
+-                if( !(m_nStyle & SAL_FRAME_STYLE_SIZEABLE) )
+-                    gtk_window_set_resizable( GTK_WINDOW(m_pWindow), TRUE );
+                 gtk_window_fullscreen( GTK_WINDOW(m_pWindow) );
+                 moveToScreen( nScreen );
+                 Size aScreenSize = pDisp->GetScreenSize( m_nScreen ); 
+diff --git vcl/unx/source/window/salframe.cxx vcl/unx/source/window/salframe.cxx
+index cc09809..95a19e1 100644
+--- vcl/unx/source/window/salframe.cxx
++++ vcl/unx/source/window/salframe.cxx
+@@ -608,8 +608,6 @@ void X11SalFrame::Init( ULONG nSalFrameStyle, int nScreen, SystemParentData* pPa
+             eType = WMAdaptor::windowType_Utility;
+         if( nStyle_ & SAL_FRAME_STYLE_OWNERDRAWDECORATION )
+             eType = WMAdaptor::windowType_Toolbar;
+-        if( nStyle_ & SAL_FRAME_STYLE_PARTIAL_FULLSCREEN )
+-            eType = WMAdaptor::windowType_Dock;
+ 
+         GetDisplay()->getWMAdaptor()->
+             setFrameTypeAndDecoration( this,
+@@ -1128,13 +1126,6 @@ void X11SalFrame::Show( BOOL bVisible, BOOL bNoActivate )
+         || ( !bVisible && !bMapped_ ) )
+         return;
+ 
+-    // HACK: this is a workaround for (at least) kwin
+-    // even though transient frames should be kept above their parent
+-    // this does not necessarily hold true for DOCK type windows
+-    // so artificially set ABOVE and remove it again on hide
+-    if( mpParent && (mpParent->nStyle_ & SAL_FRAME_STYLE_PARTIAL_FULLSCREEN ) )
+-        pDisplay_->getWMAdaptor()->enableAlwaysOnTop( this, bVisible );
+-    
+     bMapped_   = bVisible;
+     bViewable_ = bVisible;
+     setXEmbedInfo();
+@@ -2203,22 +2194,6 @@ void X11SalFrame::ShowFullScreen( BOOL bFullScreen, sal_Int32 nScreen )
+             mbMaximizedHorz = mbMaximizedVert = false;
+             createNewWindow( None, m_nScreen );
+             GetDisplay()->getWMAdaptor()->enableAlwaysOnTop( this, true );
+-            #if 0
+-            // this would give additional intent to the window
+-            // manager to force the positioning of the window;
+-            // alas all other windows will be expunged from that
+-            // region, leaving us in a pity state afterwards
+-            Size aScreenSize = pDisplay_->GetScreenSize( m_nScreen );
+-            pDisplay_->getWMAdaptor()->setFrameStruts( this,
+-                    aRect.Left(), aRect.Top(),
+-                    aScreenSize.Width() - aRect.Right(),
+-                    aScreenSize.Height() - aRect.Bottom(),
+-                    aRect.Left(), aRect.Right(),
+-                    aRect.Top(), aRect.Bottom(), 
+-                    aRect.Left(), aRect.Right(),
+-                    aRect.Top(), aRect.Bottom()
+-                    );
+-            #endif
+                         
+             if( bVisible )
+                 Show(TRUE);
commit 5835df6cb0be603a355e229cf5b4babd1639607f
Author: Thorsten Behrens <tbehrens at novell.com>
Date:   Thu Nov 26 16:17:55 2009 +0100

    Fix crash returning from writer fullscreen mode
    
    * patches/dev300/apply: added the fix
    * patches/dev300/vcl-free-renderpicture.diff: release Xrender
      pictures _before_ killing the underlying Drawable. Crash
      happened when exiting Writer fullscreen mode on xinerama
      multi-monitor setups

diff --git a/patches/dev300/apply b/patches/dev300/apply
index 474cb92..d13ed69 100644
--- a/patches/dev300/apply
+++ b/patches/dev300/apply
@@ -3400,6 +3400,8 @@ sw-doc-image-export-size.diff, bnc#554549, i#59648, tml
 ppt-customshape-shading-fix.diff, i#102797, thorsten
 # proper PS output of bezier lines
 psprint-bezier-fix.diff, n#553219, thorsten
+# fix RenderBadPicture crash in xinerama cases
+vcl-free-renderpicture.diff, thorsten
 
 [ NLPSolverBits ]
 # build NLPSolver extension when enabled (fate#304653)
diff --git a/patches/dev300/vcl-free-renderpicture.diff b/patches/dev300/vcl-free-renderpicture.diff
new file mode 100644
index 0000000..b08bab2
--- /dev/null
+++ b/patches/dev300/vcl-free-renderpicture.diff
@@ -0,0 +1,78 @@
+Fix RenderBadPicture crash
+
+From: Thorsten Behrens <thb at openoffice.org>
+
+
+---
+
+ vcl/unx/gtk/window/gtkframe.cxx    |    4 ++++
+ vcl/unx/inc/salframe.h             |    2 +-
+ vcl/unx/source/window/salframe.cxx |    9 +++++----
+ 3 files changed, 10 insertions(+), 5 deletions(-)
+
+
+diff --git vcl/unx/gtk/window/gtkframe.cxx vcl/unx/gtk/window/gtkframe.cxx
+index e3e58b5..3cc1c44 100644
+--- vcl/unx/gtk/window/gtkframe.cxx
++++ vcl/unx/gtk/window/gtkframe.cxx
+@@ -2394,6 +2394,10 @@ void GtkSalFrame::createNewWindow( XLIB_Window aNewParent, bool bXEmbed, int nSc
+         }
+     }
+ 
++    // free xrender resources
++    for( unsigned int i = 0; i < sizeof(m_aGraphics)/sizeof(m_aGraphics[0]); i++ )
++        m_aGraphics[i].pGraphics->SetDrawable( None, m_nScreen );
++
+     // first deinit frame
+     if( m_pIMHandler )
+     {
+diff --git vcl/unx/inc/salframe.h vcl/unx/inc/salframe.h
+index 56eda2c..0a0e201 100644
+--- vcl/unx/inc/salframe.h
++++ vcl/unx/inc/salframe.h
+@@ -212,7 +212,7 @@ public:
+     virtual SalGraphics*		GetGraphics();
+     virtual void				ReleaseGraphics( SalGraphics* pGraphics );
+     
+-    virtual void                updateGraphics();
++    virtual void                updateGraphics( Drawable drawable );
+ 
+     virtual BOOL				PostEvent( void* pData );
+ 
+diff --git vcl/unx/source/window/salframe.cxx vcl/unx/source/window/salframe.cxx
+index 5d0d6f9..cc09809 100644
+--- vcl/unx/source/window/salframe.cxx
++++ vcl/unx/source/window/salframe.cxx
+@@ -930,12 +930,12 @@ void X11SalFrame::ReleaseGraphics( SalGraphics *pGraphics )
+     pGraphics_		= NULL;
+ }
+ 
+-void X11SalFrame::updateGraphics()
++void X11SalFrame::updateGraphics( Drawable drawable )
+ {
+     if( pGraphics_ )
+-        pGraphics_->SetDrawable( GetWindow(), m_nScreen );
++        pGraphics_->SetDrawable( drawable, m_nScreen );
+     if( pFreeGraphics_ )
+-        pFreeGraphics_->SetDrawable( GetWindow(), m_nScreen );
++        pFreeGraphics_->SetDrawable( drawable, m_nScreen );
+ }
+ 
+ // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+@@ -2726,6 +2726,7 @@ void X11SalFrame::createNewWindow( XLIB_Window aNewParent, int nScreen )
+     }
+ 
+     // first deinit frame
++    updateGraphics(None);
+     if( mpInputContext )
+     {
+         mpInputContext->UnsetICFocus( this );
+@@ -2748,7 +2749,7 @@ void X11SalFrame::createNewWindow( XLIB_Window aNewParent, int nScreen )
+         Init( nStyle_ & ~SAL_FRAME_STYLE_PLUG, nScreen, NULL, true );
+ 
+     // update graphics if necessary
+-    updateGraphics();
++    updateGraphics(GetWindow());
+     
+     if( m_aTitle.Len() )
+         SetTitle( m_aTitle );
commit fbb30f3ffd075776d35ab122fd69c43971de5424
Author: Thorsten Behrens <tbehrens at novell.com>
Date:   Thu Nov 26 16:14:22 2009 +0100

    Fix crash in vcl's generic plugin
    
    * patches/dev300/ooo59127.vcl.honourcairofont.diff: guard
      cairosubcallback against un-set cairo font options (which
      currently happens in the generic plugin)

diff --git a/patches/dev300/ooo59127.vcl.honourcairofont.diff b/patches/dev300/ooo59127.vcl.honourcairofont.diff
index 6e21d8c..ab5817d 100644
--- a/patches/dev300/ooo59127.vcl.honourcairofont.diff
+++ b/patches/dev300/ooo59127.vcl.honourcairofont.diff
@@ -1013,11 +1013,11 @@ index bd1539e..772318c 100644
 +void cairosubcallback(void *pPattern)
 +{
 +    CairoWrapper &rCairo = CairoWrapper::get();
-+    if (rCairo.isValid())
++    void const *pFontOptions = Application::GetSettings().GetStyleSettings().GetCairoFontOptions();
++    if (rCairo.isValid() && pFontOptions)
 +    {
 +        rCairo.ft_font_options_substitute(
-+            Application::GetSettings().GetStyleSettings().GetCairoFontOptions(),
-+            pPattern);
++            pFontOptions,pPattern);
 +    }
 +}
 +


More information about the ooo-build-commit mailing list