diff options
author | Caolán McNamara <caolanm@redhat.com> | 2016-07-05 13:39:23 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2016-07-05 13:41:05 +0100 |
commit | 58d5be58d35c8fa1db9be78027aeeb94ae8e1969 (patch) | |
tree | e961a5334692434bc2c6ebc7b9afb8caab0f1b47 | |
parent | 4c09bceca3dc86987fd4d5f701b66535d3f3fe21 (diff) |
changes to floating windows shouldn't trigger re-layout on their parent
cause they are not inside them so don't affect the parents layout
Change-Id: I3c08b874ac450fb4c824b62a4e882df93c34fa68
-rw-r--r-- | vcl/inc/brdwin.hxx | 1 | ||||
-rw-r--r-- | vcl/source/window/brdwin.cxx | 11 |
2 files changed, 12 insertions, 0 deletions
diff --git a/vcl/inc/brdwin.hxx b/vcl/inc/brdwin.hxx index fd3859b9f67c..2557025568c0 100644 --- a/vcl/inc/brdwin.hxx +++ b/vcl/inc/brdwin.hxx @@ -153,6 +153,7 @@ public: virtual void RequestHelp( const HelpEvent& rHEvt ) override; virtual void StateChanged( StateChangedType nType ) override; virtual void DataChanged( const DataChangedEvent& rDCEvt ) override; + virtual void queue_resize(StateChangedType eReason = StateChangedType::Layout) override; void InitView(); void UpdateView( bool bNewView, const Size& rNewOutSize ); diff --git a/vcl/source/window/brdwin.cxx b/vcl/source/window/brdwin.cxx index 32606f7040fe..a17f085140be 100644 --- a/vcl/source/window/brdwin.cxx +++ b/vcl/source/window/brdwin.cxx @@ -2221,4 +2221,15 @@ Size ImplBorderWindow::GetOptimalSize() const return Size(mnMinWidth, mnMinHeight); } +void ImplBorderWindow::queue_resize(StateChangedType eReason) +{ + //if we are floating, then we don't want to inform our parent that it needs + //to calculate a new layout allocation. Because while we are a child + //of our parent we are not embedded into the parent so it doesn't care + //about us. + if (mbFloatWindow) + return; + vcl::Window::queue_resize(eReason); +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |