summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAshod Nakashian <ashod.nakashian@collabora.co.uk>2018-06-02 23:57:04 -0400
committerAshod Nakashian <ashod.nakashian@collabora.co.uk>2018-06-04 12:35:42 -0400
commitf0db4d1a0cc5d6b3f42b8af77bc2631a6c65c749 (patch)
treee43b447fb6b928718f27a075de223244d1c0e7de
parent731665f3c604fd3820500275445876bbc77b9c08 (diff)
vcl: refresh font cache only on real change
GTK3 emits way too many style-updated, which triggers font cache updates. The avoidance of unecessary font cache updates was first implemented in 29c55564. Unfortuantely, it seems that the current font was never set as last-seen font, so checking for font style changes would have worked, leaving the code seemingly suffering the original issue of way too many font cache updates. Change-Id: I01a47d4d7fb033e335b1a49ffa6e1bb98f7fd28d
-rw-r--r--vcl/unx/gtk3/gtk3gtkframe.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/vcl/unx/gtk3/gtk3gtkframe.cxx b/vcl/unx/gtk3/gtk3gtkframe.cxx
index 3595e0bf20c7..ff89bfbd8f5d 100644
--- a/vcl/unx/gtk3/gtk3gtkframe.cxx
+++ b/vcl/unx/gtk3/gtk3gtkframe.cxx
@@ -3216,7 +3216,7 @@ void GtkSalFrame::signalStyleUpdated(GtkWidget*, gpointer frame)
// fire off font-changed when the system cairo font hints change
GtkInstance *pInstance = static_cast<GtkInstance*>(GetSalData()->m_pInstance);
const cairo_font_options_t* pLastCairoFontOptions = pInstance->GetLastSeenCairoFontOptions();
- const cairo_font_options_t* pCurrentCairoFontOptions = gdk_screen_get_font_options(gdk_screen_get_default());
+ const cairo_font_options_t* pCurrentCairoFontOptions = pInstance->GetCairoFontOptions(); // Updates LastSeenCairoFontOptions
bool bFontSettingsChanged = true;
if (pLastCairoFontOptions && pCurrentCairoFontOptions)
bFontSettingsChanged = !cairo_font_options_equal(pLastCairoFontOptions, pCurrentCairoFontOptions);