diff options
author | Caolán McNamara <caolanm@redhat.com> | 2020-02-13 09:43:18 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2020-02-13 13:38:09 +0100 |
commit | 69498bfcf63c00e7ad70065865c6eb06780b7fe0 (patch) | |
tree | 75154f6e1eebc1a4e4fdb287693369bcb8a82224 | |
parent | f2818681e949c67bcce430c4f83b3a75df75dcc4 (diff) |
toplevel might not be a GtkWindow, no need to cast to GtkWindow
Change-Id: I3347bcff6f32e8eb61186216373a950b45ab1765
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88596
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r-- | vcl/inc/unx/gtk/gtkframe.hxx | 2 | ||||
-rw-r--r-- | vcl/unx/gtk3/a11y/gtk3atkfactory.cxx | 2 | ||||
-rw-r--r-- | vcl/unx/gtk3/gtk3gtkframe.cxx | 2 | ||||
-rw-r--r-- | vcl/unx/gtk3/gtk3gtkinst.cxx | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/vcl/inc/unx/gtk/gtkframe.hxx b/vcl/inc/unx/gtk/gtkframe.hxx index 7b6d01d872c3..d9d2d0d6631b 100644 --- a/vcl/inc/unx/gtk/gtkframe.hxx +++ b/vcl/inc/unx/gtk/gtkframe.hxx @@ -495,7 +495,7 @@ public: virtual bool HidePopover(void* nId) override; virtual weld::Window* GetFrameWeld() const override; - static GtkSalFrame *getFromWindow( GtkWindow *pWindow ); + static GtkSalFrame *getFromWindow( GtkWidget *pWindow ); sal_uIntPtr GetNativeWindowHandle(GtkWidget *pWidget); virtual sal_uIntPtr GetNativeWindowHandle() override; diff --git a/vcl/unx/gtk3/a11y/gtk3atkfactory.cxx b/vcl/unx/gtk3/a11y/gtk3atkfactory.cxx index d7c8bf9f6289..f92f9a667c9f 100644 --- a/vcl/unx/gtk3/a11y/gtk3atkfactory.cxx +++ b/vcl/unx/gtk3/a11y/gtk3atkfactory.cxx @@ -116,7 +116,7 @@ wrapper_factory_create_accessible( GObject *obj ) if (!pTopLevel) return atk_noop_object_wrapper_new(); - GtkSalFrame* pFrame = GtkSalFrame::getFromWindow(GTK_WINDOW(pTopLevel)); + GtkSalFrame* pFrame = GtkSalFrame::getFromWindow(pTopLevel); g_return_val_if_fail( pFrame != nullptr, nullptr ); vcl::Window* pFrameWindow = pFrame->GetWindow(); diff --git a/vcl/unx/gtk3/gtk3gtkframe.cxx b/vcl/unx/gtk3/gtk3gtkframe.cxx index 09a6b11bc45e..62d49dd106e8 100644 --- a/vcl/unx/gtk3/gtk3gtkframe.cxx +++ b/vcl/unx/gtk3/gtk3gtkframe.cxx @@ -997,7 +997,7 @@ void GtkSalFrame::InitCommon() SetIcon(SV_ICON_ID_OFFICE); } -GtkSalFrame *GtkSalFrame::getFromWindow( GtkWindow *pWindow ) +GtkSalFrame *GtkSalFrame::getFromWindow( GtkWidget *pWindow ) { return static_cast<GtkSalFrame *>(g_object_get_data( G_OBJECT( pWindow ), "SalFrame" )); } diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx index cb0adf9c57b2..ceab06bd4311 100644 --- a/vcl/unx/gtk3/gtk3gtkinst.cxx +++ b/vcl/unx/gtk3/gtk3gtkinst.cxx @@ -4015,7 +4015,7 @@ struct DialogRunner , m_nModalDepth(0) { GtkWindow* pParent = gtk_window_get_transient_for(m_pDialog); - GtkSalFrame* pFrame = pParent ? GtkSalFrame::getFromWindow(pParent) : nullptr; + GtkSalFrame* pFrame = pParent ? GtkSalFrame::getFromWindow(GTK_WIDGET(pParent)) : nullptr; m_xFrameWindow = pFrame ? pFrame->GetWindow() : nullptr; } |