diff options
author | Caolán McNamara <caolanm@redhat.com> | 2022-02-18 20:35:01 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2022-02-19 12:01:32 +0100 |
commit | f10ac3e5bd720e363e5c76a2c841dded4859a7a0 (patch) | |
tree | 5f38615f403f354ba7e055fd7271abda38b86bc2 /avmedia/source/gtk | |
parent | 62d9d64c90eaf4b6d8ff20b615c5645e12a9cba9 (diff) |
gtk4: use gtk_widget_set_can_target so the video can be picked up and moved
at least the rect it should stick to can be picked up and moved
Change-Id: I71b53865049fef8dc3efa09dd441d66003ed1f47
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130177
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'avmedia/source/gtk')
-rw-r--r-- | avmedia/source/gtk/gtkplayer.cxx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/avmedia/source/gtk/gtkplayer.cxx b/avmedia/source/gtk/gtkplayer.cxx index ea6276e02a59..098e8b3b6fe6 100644 --- a/avmedia/source/gtk/gtkplayer.cxx +++ b/avmedia/source/gtk/gtkplayer.cxx @@ -272,10 +272,12 @@ uno::Reference<::media::XPlayerWindow> m_pVideo = gtk_picture_new_for_paintable(GDK_PAINTABLE(m_pStream)); gtk_picture_set_keep_aspect_ratio(GTK_PICTURE(m_pVideo), false); + gtk_widget_set_can_target(m_pVideo, false); gtk_widget_set_vexpand(m_pVideo, true); gtk_widget_set_hexpand(m_pVideo, true); GtkWidget* pParent = static_cast<GtkWidget*>(pEnvData->pWidget); + gtk_widget_set_can_target(pParent, false); gtk_grid_attach(GTK_GRID(pParent), m_pVideo, 0, 0, 1, 1); gtk_widget_show(m_pVideo); gtk_widget_show(pParent); @@ -355,7 +357,7 @@ uno::Reference<media::XFrameGrabber> SAL_CALL GtkPlayer::createFrameGrabber() rtl::Reference<GtkFrameGrabber> xFrameGrabber; SAL_WARN("avmedia.gtk", "TODO: createFrameGrabber"); - const awt::Size aPrefSize(getPreferredPlayerWindowSize()); + // const awt::Size aPrefSize(getPreferredPlayerWindowSize()); xFrameGrabber.set(new GtkFrameGrabber(m_pStream)); |