diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-11-15 12:06:58 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2021-11-15 17:30:56 +0100 |
commit | 82dab2e8c72c024794862b487d6988ad576e57d6 (patch) | |
tree | e826234eb7c6603e72efd7a02c9c84ea41dd3023 /vcl | |
parent | acb3638afd79472851bdf111192a2c023f44bf67 (diff) |
gtk4: complete do_collect_screenshot_data
Change-Id: I6bb13ca5d174d8a5cccff24953bc2b3057769c78
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125243
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/unx/gtk3/gtkinst.cxx | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/vcl/unx/gtk3/gtkinst.cxx b/vcl/unx/gtk3/gtkinst.cxx index 8960b70aa34c..3a7b2f86fd72 100644 --- a/vcl/unx/gtk3/gtkinst.cxx +++ b/vcl/unx/gtk3/gtkinst.cxx @@ -5979,7 +5979,6 @@ namespace return Point(x, y); } -#if !GTK_CHECK_VERSION(4, 0, 0) void do_collect_screenshot_data(GtkWidget* pItem, gpointer data) { GtkWidget* pTopLevel = widget_get_toplevel(pItem); @@ -6001,12 +6000,17 @@ namespace pCollection->emplace_back(::get_help_id(pItem), aCurrentRange); } -#if !GTK_CHECK_VERSION(4, 0, 0) +#if GTK_CHECK_VERSION(4, 0, 0) + for (GtkWidget* pChild = gtk_widget_get_first_child(pItem); + pChild; pChild = gtk_widget_get_next_sibling(pChild)) + { + do_collect_screenshot_data(pChild, data); + } +#else if (GTK_IS_CONTAINER(pItem)) gtk_container_forall(GTK_CONTAINER(pItem), do_collect_screenshot_data, data); #endif } -#endif tools::Rectangle get_monitor_workarea(GtkWidget* pWindow) { @@ -6340,7 +6344,13 @@ public: { weld::ScreenShotCollection aRet; -#if !GTK_CHECK_VERSION(4, 0, 0) +#if GTK_CHECK_VERSION(4, 0, 0) + for (GtkWidget* pChild = gtk_widget_get_first_child(GTK_WIDGET(m_pWindow)); + pChild; pChild = gtk_widget_get_next_sibling(pChild)) + { + do_collect_screenshot_data(pChild, &aRet); + } +#else gtk_container_foreach(GTK_CONTAINER(m_pWindow), do_collect_screenshot_data, &aRet); #endif |