diff options
author | Thorsten Behrens <thb@openoffice.org> | 2009-11-27 17:39:26 +0000 |
---|---|---|
committer | Thorsten Behrens <thb@openoffice.org> | 2009-11-27 17:39:26 +0000 |
commit | ab651c33a7a67bb50f49015d7bccb18fd7eae8e3 (patch) | |
tree | 2feeadf5e8d286d6bbccad82fcf4a9e904f7548b | |
parent | d14ff396c43feebd0cbceb7cdc327ad56024195a (diff) |
#i107248# Free render Picture before killing underlying drawable
-rw-r--r-- | vcl/unx/gtk/window/gtkframe.cxx | 5 | ||||
-rw-r--r-- | vcl/unx/inc/salframe.h | 2 | ||||
-rw-r--r-- | vcl/unx/source/window/salframe.cxx | 9 |
3 files changed, 11 insertions, 5 deletions
diff --git a/vcl/unx/gtk/window/gtkframe.cxx b/vcl/unx/gtk/window/gtkframe.cxx index 99a331be2318..92ff2d3b8d8e 100644 --- a/vcl/unx/gtk/window/gtkframe.cxx +++ b/vcl/unx/gtk/window/gtkframe.cxx @@ -2377,6 +2377,11 @@ 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++ ) + if( m_aGraphics[i].bInUse ) + m_aGraphics[i].pGraphics->SetDrawable( None, m_nScreen ); + // first deinit frame if( m_pIMHandler ) { diff --git a/vcl/unx/inc/salframe.h b/vcl/unx/inc/salframe.h index 848f2250d31c..c640b0398a97 100644 --- a/vcl/unx/inc/salframe.h +++ b/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 a/vcl/unx/source/window/salframe.cxx b/vcl/unx/source/window/salframe.cxx index 6219b50d6ec3..37f995838d48 100644 --- a/vcl/unx/source/window/salframe.cxx +++ b/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 ); |