[Libreoffice-commits] core.git: Branch 'libreoffice-6-2-0' - vcl/unx
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Tue Jan 22 08:52:32 UTC 2019
vcl/unx/gtk3/gtk3gtkinst.cxx | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
New commits:
commit 7c104f8ae8c1571f4653f85e7a284ee5e3743304
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Wed Jan 9 12:14:23 2019 +0000
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Tue Jan 22 09:52:10 2019 +0100
Resolves: crash in double-split when first timeout hadn't expired yet
Change-Id: Ieba97589a3794cf5ed95839e20cc4028cfedae3a
Reviewed-on: https://gerrit.libreoffice.org/66067
Reviewed-by: Michael Stahl <Michael.Stahl at cib.de>
Reviewed-by: Eike Rathke <erack at redhat.com>
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx
index 5f75abcce840..4b4a706df61d 100644
--- a/vcl/unx/gtk3/gtk3gtkinst.cxx
+++ b/vcl/unx/gtk3/gtk3gtkinst.cxx
@@ -3111,6 +3111,7 @@ private:
gulong m_nSwitchPageSignalId;
gulong m_nOverFlowSwitchPageSignalId;
gulong m_nSizeAllocateSignalId;
+ guint m_nLaunchSplitTimeoutId;
bool m_bOverFlowBoxActive;
bool m_bOverFlowBoxIsStart;
int m_nStartTabCount;
@@ -3436,6 +3437,7 @@ private:
int nCurrentPage = pThis->get_current_page();
pThis->split_notebooks();
pThis->set_current_page(nCurrentPage);
+ pThis->m_nLaunchSplitTimeoutId = 0;
return false;
}
@@ -3446,7 +3448,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);
@@ -3457,7 +3459,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<GSourceFunc>(launch_split_notebooks), this, nullptr);
+ m_nLaunchSplitTimeoutId = g_timeout_add_full(G_PRIORITY_HIGH_IDLE, 0, reinterpret_cast<GSourceFunc>(launch_split_notebooks), this, nullptr);
break;
}
}
@@ -3479,6 +3481,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)
More information about the Libreoffice-commits
mailing list