vcl/unx/gtk3/gtksalmenu.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
New commits: commit 045d0d6845e0120020140407879e050d52ceb6fa Author: Julien Nabet <serval2...@yahoo.fr> AuthorDate: Wed Aug 2 10:38:10 2023 +0200 Commit: Julien Nabet <serval2...@yahoo.fr> CommitDate: Wed Aug 2 12:42:03 2023 +0200 Fix gtk4: conversion from 'AbsoluteScreenPixelRectangle' to 'tools::Rectangle' Following b6b26421a1029b18b48b69dbdac4bb70fb622604 "split Point/Size/Rectangle into AbsoluteScreenPixel* types" I got this error: In file included from /home/julien/lo/libreoffice/vcl/unx/gtk4/gtksalmenu.cxx:10: /home/julien/lo/libreoffice/vcl/unx/gtk4/../gtk3/gtksalmenu.cxx:470:22: error: no viable conversion from 'AbsoluteScreenPixelRectangle' to 'tools::Rectangle' tools::Rectangle aFloatRect = FloatingWindow::ImplConvertToAbsPos(xParent, rRect); ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /home/julien/lo/libreoffice/include/tools/gen.hxx: 879:23: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'AbsoluteScreenPixelRectangle' to 'const tools::Rectangle &' for 1st argument class SAL_WARN_UNUSED Rectangle final : public RectangleTemplate<Rectangle, Point, Size> ^ /home/julien/lo/libreoffice/include/tools/gen.hxx:879:23: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'AbsoluteScreenPixelRectangle' to 'tools::Rectangle &&' for 1st argument /home/julien/lo/libreoffice/include/tools/gen.hxx:888:24: note: explicit constructor is not a candidate constexpr explicit Rectangle(const AbsoluteScreenPixelRectangle & r); Change-Id: I3e77ce65ba1c5f2ab8cad818f8158b65abe510eb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155214 Reviewed-by: Julien Nabet <serval2...@yahoo.fr> Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> Tested-by: Jenkins diff --git a/vcl/unx/gtk3/gtksalmenu.cxx b/vcl/unx/gtk3/gtksalmenu.cxx index 89f2d6a51e52..c3b55d3036ea 100644 --- a/vcl/unx/gtk3/gtksalmenu.cxx +++ b/vcl/unx/gtk3/gtksalmenu.cxx @@ -467,7 +467,7 @@ bool GtkSalMenu::ShowNativePopupMenu(FloatingWindow* pWin, const tools::Rectangl mpFrame->BlockTooltip(); #if GTK_CHECK_VERSION(4, 0, 0) - tools::Rectangle aFloatRect = FloatingWindow::ImplConvertToAbsPos(xParent, rRect); + AbsoluteScreenPixelRectangle aFloatRect = FloatingWindow::ImplConvertToAbsPos(xParent, rRect); aFloatRect.Move(-mpFrame->maGeometry.x(), -mpFrame->maGeometry.y()); GdkRectangle rect {static_cast<int>(aFloatRect.Left()), static_cast<int>(aFloatRect.Top()), static_cast<int>(aFloatRect.GetWidth()), static_cast<int>(aFloatRect.GetHeight())};