summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2019-09-19 11:40:44 +0100
committerCaolán McNamara <caolanm@redhat.com>2019-09-19 15:47:54 +0200
commita253b3b4959edddbff37d9673037da1e1f7be95a (patch)
tree8d80f5a30b29d768820cd83fdef54af942d7ea8d
parent77a8a54655db9715a745927a28b817ec32591d14 (diff)
mpWindow might be a GtkEventBox instead of a GtkWindow
Change-Id: I6f547d6d21a60661c78bc919536dc4cf319089e5 Reviewed-on: https://gerrit.libreoffice.org/79120 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx b/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx
index d5ac0a5ab475..20d658c4a796 100644
--- a/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx
+++ b/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx
@@ -1359,7 +1359,7 @@ static GtkWidgetPath* buildRTLComboSiblingsPath(gtk_widget_path_iter_set_object_
GtkStyleContext* GtkSalGraphics::makeContext(GtkWidgetPath *pPath, GtkStyleContext *pParent)
{
GtkStyleContext* context = gtk_style_context_new();
- gtk_style_context_set_screen(context, gtk_window_get_screen(GTK_WINDOW(mpWindow)));
+ gtk_style_context_set_screen(context, gtk_widget_get_screen(mpWindow));
gtk_style_context_set_path(context, pPath);
gtk_style_context_set_parent(context, pParent);
gtk_widget_path_unref(pPath);
@@ -3000,7 +3000,7 @@ bool GtkSalGraphics::updateSettings(AllSettings& rSettings)
// tooltip colors
{
GtkStyleContext *pCStyle = gtk_style_context_new();
- gtk_style_context_set_screen( pCStyle, gtk_window_get_screen( GTK_WINDOW( mpWindow ) ) );
+ gtk_style_context_set_screen(pCStyle, gtk_widget_get_screen(mpWindow));
GtkWidgetPath *pCPath = gtk_widget_path_new();
guint pos = gtk_widget_path_append_type(pCPath, GTK_TYPE_WINDOW);
gtk_widget_path_iter_add_class(pCPath, pos, GTK_STYLE_CLASS_TOOLTIP);
@@ -3023,7 +3023,7 @@ bool GtkSalGraphics::updateSettings(AllSettings& rSettings)
{
// construct style context for text view
GtkStyleContext *pCStyle = gtk_style_context_new();
- gtk_style_context_set_screen( pCStyle, gtk_window_get_screen( GTK_WINDOW( mpWindow ) ) );
+ gtk_style_context_set_screen(pCStyle, gtk_widget_get_screen(mpWindow));
GtkWidgetPath *pCPath = gtk_widget_path_new();
gtk_widget_path_append_type( pCPath, GTK_TYPE_TEXT_VIEW );
gtk_widget_path_iter_add_class( pCPath, -1, GTK_STYLE_CLASS_VIEW );