summaryrefslogtreecommitdiff
path: root/vcl/source/window/layout.cxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-10-29 17:12:11 +0000
committerCaolán McNamara <caolanm@redhat.com>2014-10-29 17:14:10 +0000
commit62c125bbb4d27631af6cbcb498e765c0b215b734 (patch)
treee66641b2c6546abd5cd247b5bc2fffe0badf5acc /vcl/source/window/layout.cxx
parent591d4559c5068d6f1f61fc63571a9fa6286b5661 (diff)
Resolves: rhbz#1146169 a11y frames label dies before frame
Change-Id: Ie5650c3a5593dcf68196802169c47270a0c3b0e6
Diffstat (limited to 'vcl/source/window/layout.cxx')
-rw-r--r--vcl/source/window/layout.cxx13
1 files changed, 12 insertions, 1 deletions
diff --git a/vcl/source/window/layout.cxx b/vcl/source/window/layout.cxx
index 5f5ad67ce6f0..9d4b1672cd83 100644
--- a/vcl/source/window/layout.cxx
+++ b/vcl/source/window/layout.cxx
@@ -1340,10 +1340,21 @@ void VclFrame::setAllocation(const Size &rAllocation)
setLayoutAllocation(*pChild, aChildPos, aAllocation);
}
+IMPL_LINK(VclFrame, WindowEventListener, VclSimpleEvent*, pEvent)
+{
+ if (pEvent && pEvent->GetId() == VCLEVENT_OBJECT_DYING)
+ designate_label(NULL);
+ return 0;
+}
+
void VclFrame::designate_label(vcl::Window *pWindow)
{
- assert(pWindow->GetParent() == this);
+ assert(!pWindow || pWindow->GetParent() == this);
+ if (m_pLabel)
+ m_pLabel->RemoveEventListener(LINK(this, VclFrame, WindowEventListener));
m_pLabel = pWindow;
+ if (m_pLabel)
+ m_pLabel->AddEventListener(LINK(this, VclFrame, WindowEventListener));
}
const vcl::Window *VclFrame::get_label_widget() const