diff options
author | Philipp Lohmann <pl@openoffice.org> | 2002-10-28 13:37:42 +0000 |
---|---|---|
committer | Philipp Lohmann <pl@openoffice.org> | 2002-10-28 13:37:42 +0000 |
commit | 4ab9e299b94ef01dadcd3dfda986b9623969e42d (patch) | |
tree | bdc4ade68e1e01582e616286873af3eb5143f100 /vcl/unx | |
parent | 8a243100afcaedf2f6c26e5a89b0e70d6103116f (diff) |
#103973# check validity of last parent in XIM status window
Diffstat (limited to 'vcl/unx')
-rw-r--r-- | vcl/unx/source/app/i18n_status.cxx | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/vcl/unx/source/app/i18n_status.cxx b/vcl/unx/source/app/i18n_status.cxx index 7eb210aeaec2..15bdf5a30e32 100644 --- a/vcl/unx/source/app/i18n_status.cxx +++ b/vcl/unx/source/app/i18n_status.cxx @@ -2,9 +2,9 @@ * * $RCSfile: i18n_status.cxx,v $ * - * $Revision: 1.17 $ + * $Revision: 1.18 $ * - * last change: $Author: pl $ $Date: 2002-09-18 16:28:35 $ + * last change: $Author: pl $ $Date: 2002-10-28 14:37:42 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -140,6 +140,7 @@ class XIMStatusWindow : public StatusWindow Point updatePosition(); void layout(); + bool checkLastParent() const; DECL_LINK( DelayedShowHdl, void* ); public: @@ -192,6 +193,21 @@ void XIMStatusWindow::layout() SetOutputSizePixel( m_aWindowSize ); } +bool XIMStatusWindow::checkLastParent() const +{ + if( m_pLastParent ) + { + SalFrame* pFrame = GetSalData()->pFirstFrame_; + while( pFrame ) + { + if( pFrame == m_pLastParent ) + return true; + pFrame = pFrame->maFrameData.GetNextFrame(); + } + } + return false; +} + void XIMStatusWindow::DataChanged( const DataChangedEvent& rEvt ) { m_aStatusText.SetSettings( GetSettings() ); @@ -201,7 +217,7 @@ void XIMStatusWindow::DataChanged( const DataChangedEvent& rEvt ) Point XIMStatusWindow::updatePosition() { Point aRet; - if( m_pLastParent ) + if( checkLastParent() ) { const SystemEnvData* pEnvData = GetSystemData(); const SystemEnvData* pParentEnvData = m_pLastParent->GetSystemData(); @@ -236,7 +252,6 @@ void XIMStatusWindow::setPosition( SalFrame* pParent ) if( IsVisible() ) { const SystemEnvData* pEnvData = GetSystemData(); - const SystemEnvData* pParentEnvData = m_pLastParent->GetSystemData(); SalFrame* pStatusFrame = (SalFrame*)pEnvData->pSalFrame; pStatusFrame->maFrameData.setPosSize( Rectangle( updatePosition(), m_aWindowSize ) ); } |