From e87be6db93860f33bc7141dc8ba9ddf6430ae2c0 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Wed, 9 Jan 2019 12:14:23 +0000 Subject: Resolves: crash in double-split when first timeout hadn't expired yet MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Ieba97589a3794cf5ed95839e20cc4028cfedae3a Reviewed-on: https://gerrit.libreoffice.org/66018 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara --- vcl/unx/gtk3/gtk3gtkinst.cxx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'vcl') diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx index b254a68cdae1..a589b2af38b6 100644 --- a/vcl/unx/gtk3/gtk3gtkinst.cxx +++ b/vcl/unx/gtk3/gtk3gtkinst.cxx @@ -3039,6 +3039,7 @@ private: gulong m_nSwitchPageSignalId; gulong m_nOverFlowSwitchPageSignalId; gulong m_nSizeAllocateSignalId; + guint m_nLaunchSplitTimeoutId; bool m_bOverFlowBoxActive; bool m_bOverFlowBoxIsStart; int m_nStartTabCount; @@ -3364,6 +3365,7 @@ private: int nCurrentPage = pThis->get_current_page(); pThis->split_notebooks(); pThis->set_current_page(nCurrentPage); + pThis->m_nLaunchSplitTimeoutId = 0; return false; } @@ -3374,7 +3376,7 @@ private: // tabs in a single row when they would fit void signal_notebook_size_allocate() { - if (m_bOverFlowBoxActive) + if (m_bOverFlowBoxActive || m_nLaunchSplitTimeoutId) return; disable_notify_events(); gint nPages = gtk_notebook_get_n_pages(m_pNotebook); @@ -3385,7 +3387,7 @@ private: GtkWidget* pTabWidget = gtk_notebook_get_tab_label(m_pNotebook, gtk_notebook_get_nth_page(m_pNotebook, i)); if (!gtk_widget_get_child_visible(pTabWidget)) { - g_timeout_add_full(G_PRIORITY_HIGH_IDLE, 0, reinterpret_cast(launch_split_notebooks), this, nullptr); + m_nLaunchSplitTimeoutId = g_timeout_add_full(G_PRIORITY_HIGH_IDLE, 0, reinterpret_cast(launch_split_notebooks), this, nullptr); break; } } @@ -3407,6 +3409,7 @@ public: , m_pOverFlowNotebook(GTK_NOTEBOOK(gtk_notebook_new())) , m_nSwitchPageSignalId(g_signal_connect(pNotebook, "switch-page", G_CALLBACK(signalSwitchPage), this)) , m_nOverFlowSwitchPageSignalId(g_signal_connect(m_pOverFlowNotebook, "switch-page", G_CALLBACK(signalOverFlowSwitchPage), this)) + , m_nLaunchSplitTimeoutId(0) , m_bOverFlowBoxActive(false) , m_bOverFlowBoxIsStart(false) , m_nStartTabCount(0) -- cgit llabora/co-24.04.3'>distro/collabora/co-24.04.3 LibreOffice 核心代码仓库文档基金会
summaryrefslogtreecommitdiff
AgeCommit message (Expand)Author
2022-08-13clang-tidy modernize-pass-by-value in variousNoel Grandin
2022-05-01use more string_view in variousNoel Grandin
2022-04-01cpputools : use std::mutex instead of osl::MutexArnaud Versini
2022-01-13Recheck modules [a-c]* with IWYUGabor Kelemen
2022-01-08Don't install the uno script when uno is not buildJan-Marek Glogowski
2022-01-08Don't build the static uno binaryJan-Marek Glogowski
2022-01-08sp2bv is just used by the ODK on WindowsJan-Marek Glogowski
2021-10-03drop 'using namespace std' in cpputoolsJulien Nabet
2021-09-30loplugin:constmethod handle more casesNoel Grandin
2021-09-23Extend loplugin:stringviewparam to starts/endsWith: cpputoolsStephan Bergmann
2021-07-26cpputools : no need to use fprintf for putting a stringArnaud Versini
2021-04-07Updated README.md files to represent current code / use Markdown formatHossein
2021-03-25const OUString -> const OUStringLiteralMike Kaganski
2021-03-24Using .md extension/Markdown syntax for modules READMEHossein
2021-02-23loplugin:refcounting check for managing OWeakObject with raw pointerNoel
2020-12-11Adapt the remaining OUString functions to std string_viewStephan Bergmann
2020-11-11loplugin:stringviewNoel
2020-07-01Upcoming improved loplugin:staticanonymous -> redundantstatic: cpputoolsStephan Bergmann
2019-12-18sal_Char->char in cppcanvas..cuiNoel Grandin
2019-11-22Extend loplugin:external to warn about classesStephan Bergmann
2019-08-31Add version resource to executables where it was missingMike Kaganski