summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2019-06-12 09:56:24 +0100
committerCaolán McNamara <caolanm@redhat.com>2019-06-12 16:35:38 +0200
commitf6e2e0d022340b1dbbf8fd16be2f4fed3a57612c (patch)
tree01692ac7ca79980e623821e42d2522a1dde227b9 /vcl
parentdbe79b15b44058da2c47e8f1ebfb7fd9bd946685 (diff)
setting cursor needs widget to be realized
Change-Id: I56b1bb83dc221c87ec7aac72b406d67c85f74f43 Reviewed-on: https://gerrit.libreoffice.org/73879 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/unx/gtk3/gtk3gtkinst.cxx2
1 files changed, 2 insertions, 0 deletions
diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx
index eb1511d5f53a..0447ee41280c 100644
--- a/vcl/unx/gtk3/gtk3gtkinst.cxx
+++ b/vcl/unx/gtk3/gtk3gtkinst.cxx
@@ -8774,6 +8774,8 @@ public:
virtual void set_cursor(PointerStyle ePointerStyle) override
{
GdkCursor *pCursor = GtkSalFrame::getDisplay()->getCursor(ePointerStyle);
+ if (!gtk_widget_get_realized(GTK_WIDGET(m_pDrawingArea)))
+ gtk_widget_realize(GTK_WIDGET(m_pDrawingArea));
gdk_window_set_cursor(gtk_widget_get_window(GTK_WIDGET(m_pDrawingArea)), pCursor);
}