diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-03-03 11:59:57 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2021-03-03 18:33:33 +0100 |
commit | 279ee055ab85c9e21df46594d0f13c5b6c426c09 (patch) | |
tree | 6de66ce60f7927ef37ae8dfa6905e49c26584445 /vcl/unx | |
parent | c4716e8c205724ee7dffd78997f7f933f157ac69 (diff) |
layout on resize immediately
but continue to layout at idle on queue_resize
Change-Id: I1d0f2dd2d2f5631753092cf0450d2002e2ba3484
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111902
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl/unx')
-rw-r--r-- | vcl/unx/gtk3/gtk3gtkinst.cxx | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx index 193f222cf3ed..63ebf1885967 100644 --- a/vcl/unx/gtk3/gtk3gtkinst.cxx +++ b/vcl/unx/gtk3/gtk3gtkinst.cxx @@ -3740,17 +3740,23 @@ public: maLayoutIdle.Start(); } + void Layout() + { + if (vcl::Window *pChild = GetWindow(GetWindowType::FirstChild)) + pChild->SetPosSizePixel(Point(0, 0), GetSizePixel()); + } + virtual void Resize() override { + maLayoutIdle.Stop(); + Layout(); WorkWindow::Resize(); - queue_resize(); } }; IMPL_LINK_NOARG(ChildFrame, ImplHandleLayoutTimerHdl, Timer*, void) { - if (vcl::Window *pChild = GetWindow(GetWindowType::FirstChild)) - pChild->SetPosSizePixel(Point(0, 0), GetSizePixel()); + Layout(); } class GtkInstanceContainer : public GtkInstanceWidget, public virtual weld::Container |