diff options
author | Caolán McNamara <caolanm@redhat.com> | 2019-06-12 09:56:24 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2019-06-12 16:35:38 +0200 |
commit | f6e2e0d022340b1dbbf8fd16be2f4fed3a57612c (patch) | |
tree | 01692ac7ca79980e623821e42d2522a1dde227b9 /vcl | |
parent | dbe79b15b44058da2c47e8f1ebfb7fd9bd946685 (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.cxx | 2 |
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); } |