vcl/unx/gtk3/gtkinst.cxx | 4 ++++
1 file changed, 4 insertions(+)
New commits:
commit 10d32939b1742f0eb935dc970d298c5f4b8b127c
Author: Michael Weghorn <[email protected]>
AuthorDate: Wed Dec 4 09:17:21 2024 +0100
Commit: Michael Weghorn <[email protected]>
CommitDate: Wed Dec 4 11:29:52 2024 +0100
gtk4: Unbreak --enable-gtk4 build
gtk_icon_view_convert_widget_to_bin_window_coords was
dropped in gtk commit [1]
commit 8dc5e13e8c66cd260edff17dbaa10eedcc95ae1b
Author: Timm Bäder <[email protected]>
Date: Tue Jun 27 11:11:57 2017 +0200
iconview: Remove bin_window
, so make the code using it conditional for gtk3.
This at least unbreaks the build for now after
commit a36a58933a1e07d3f54bacd5c2fe8ca53063a63a
Date: Mon Nov 25 17:07:59 2024 +0530
sd: convert sidebar masterpage panels from drawingview to iconview
It's possible gtk4 needs to do something else instead,
but that can still be added later.
See discussion newly started at [2] which might
give some insights.
[1]
https://gitlab.gnome.org/GNOME/gtk/-/commit/8dc5e13e8c66cd260edff17dbaa10eedcc95ae1b
[2]
https://gerrit.libreoffice.org/c/core/+/177642/comment/4edf0ddd_f71cb30b/
Change-Id: I3bd42614addd03d483c7b41daa2b3a4677b9318e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177769
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <[email protected]>
diff --git a/vcl/unx/gtk3/gtkinst.cxx b/vcl/unx/gtk3/gtkinst.cxx
index 47841398e847..f1ca1030e300 100644
--- a/vcl/unx/gtk3/gtkinst.cxx
+++ b/vcl/unx/gtk3/gtkinst.cxx
@@ -2263,6 +2263,7 @@ namespace
rOutRect = GdkRectangle{static_cast<int>(rInRect.Left()),
static_cast<int>(rInRect.Top()),
static_cast<int>(rInRect.GetWidth()),
static_cast<int>(rInRect.GetHeight())};
+#if !GTK_CHECK_VERSION(4, 0, 0)
if (GTK_IS_ICON_VIEW(pWidget))
{
// GtkIconView is a little weird in its positioning with
scrolling, so adjust here to match what
@@ -2272,6 +2273,7 @@ namespace
rOutRect.x -= nOffsetX;
rOutRect.y -= nOffsetY;
}
+#endif
if (SwapForRTL(pWidget))
rOutRect.x = gtk_widget_get_allocated_width(pWidget) -
rOutRect.width - 1 - rOutRect.x;
@@ -17159,9 +17161,11 @@ private:
gtk_icon_view_get_cell_rect(m_pIconView, path, nullptr, &aRect);
gtk_tree_path_free(path);
+#if !GTK_CHECK_VERSION(4, 0, 0)
// GtkIconView is a little weird in its positioning with scrolling
gtk_icon_view_convert_widget_to_bin_window_coords(m_pIconView,
aRect.x, aRect.y, &aRect.x,
&aRect.y);
+#endif
return tools::Rectangle(aRect.x, aRect.y, aRect.x + aRect.width,
aRect.y + aRect.height);
}