diff --git a/0003-workaround-for-LXQt-panel.patch b/0003-workaround-for-LXQt-panel.patch new file mode 100644 index 0000000..d87b4e5 --- /dev/null +++ b/0003-workaround-for-LXQt-panel.patch @@ -0,0 +1,27 @@ +From b044fcc731d3b7f81ec7f8cb390a6fd928f0c5fb Mon Sep 17 00:00:00 2001 +From: Alan Griffiths +Date: Wed, 19 Feb 2025 15:35:45 +0000 +Subject: [PATCH] Workaround for LXQt panel + +--- + src/miral/basic_window_manager.cpp | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/src/miral/basic_window_manager.cpp b/src/miral/basic_window_manager.cpp +index c514092bab..bc1c9f6a24 100644 +--- a/src/miral/basic_window_manager.cpp ++++ b/src/miral/basic_window_manager.cpp +@@ -2118,6 +2118,13 @@ auto antipodes(MirPlacementGravity rect_gravity) -> MirPlacementGravity + + auto constrain_to(mir::geometry::Rectangle const& rect, Point point) -> Point + { ++ // The LXQt panel items sets anchor rects outside their window geometry, ++ // conditionally allow this as a workaround ++ if (getenv("MIR_ANCHOR_RECTANGLE_UNCONSTRAINED") != nullptr) ++ { ++ return point; ++ } ++ + if (point.x < rect.top_left.x) + point.x = rect.top_left.x; + diff --git a/0004-check-buffer-size.patch b/0004-check-buffer-size.patch new file mode 100644 index 0000000..ac56a07 --- /dev/null +++ b/0004-check-buffer-size.patch @@ -0,0 +1,28 @@ +From 73de77f186b03fea4906f4dd358deb21d5fb6889 Mon Sep 17 00:00:00 2001 +From: Alan Griffiths +Date: Thu, 20 Feb 2025 10:50:26 +0000 +Subject: [PATCH] Check we have a buffer size before using it + +--- + src/server/frontend_wayland/wl_data_device.cpp | 7 +++++-- + 1 file changed, 5 insertions(+), 2 deletions(-) + +diff --git a/src/server/frontend_wayland/wl_data_device.cpp b/src/server/frontend_wayland/wl_data_device.cpp +index 5381db1ab4d..282abe53bfa 100644 +--- a/src/server/frontend_wayland/wl_data_device.cpp ++++ b/src/server/frontend_wayland/wl_data_device.cpp +@@ -374,8 +374,11 @@ mf::WlDataDevice::DragIconSurface::DragIconSurface(WlSurface* icon, std::shared_ + icon->set_role(this); + + auto spec = shell::SurfaceSpecification(); +- spec.width = surface.value().buffer_size()->width; +- spec.height = surface.value().buffer_size()->height; ++ if (auto const size = surface.value().buffer_size()) ++ { ++ spec.width = size->width; ++ spec.height = size->height; ++ } + spec.streams = std::vector{}; + spec.input_shape = std::vector{}; + spec.depth_layer = mir_depth_layer_overlay; + diff --git a/mir.changes b/mir.changes index ca5458f..da55c08 100644 --- a/mir.changes +++ b/mir.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Thu Feb 20 17:04:43 UTC 2025 - Shawn Dunn + +- Add: + - 0003-workaround-for-LXQt-panel.patch (gh#canonical/mir#3764) + - 0004-check-buffer-size.patch (gh#canonical/mir#3766) + ------------------------------------------------------------------- Mon Jan 20 16:20:10 UTC 2025 - Shawn Dunn @@ -6,7 +13,7 @@ Mon Jan 20 16:20:10 UTC 2025 - Shawn Dunn * kms: skip simple-framebuffer devices (#3721) - Add: * 0002-remove-use-of-env-to-call-bash.patch - + ------------------------------------------------------------------- Wed Dec 25 18:44:49 UTC 2024 - Shawn Dunn diff --git a/mir.spec b/mir.spec index ccd1872..ae508ad 100644 --- a/mir.spec +++ b/mir.spec @@ -2,7 +2,7 @@ # spec file for package mir # # Copyright (c) 2024 SUSE LLC -# Copyright (c) Shawn W Dunn +# Copyright (c) Shawn W Dunn # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -46,6 +46,10 @@ Source: https://github.com/canonical/%{name}/releases/download/v%{versio Patch0: 0001-Fix-include-paths.patch # PATCH-FIX-OPENSUSE 0002-remove-use-of-env-to-call-bash.patch Patch1: 0002-remove-use-of-env-to-call-bash.patch +# PATCH-FIX-UPSTREAM 0003-workaround-for-LXQt-panel.patch sfalken@opensuse.org (gh#canonical/mir#3761) +Patch2: 0003-workaround-for-LXQt-panel.patch +# PATCH-FIX-UPSTREAM 0004-check-buffer-size.patch sfalken@opensuse.org (gh#canonical/mir#3761) +Patch3: 0004-check-buffer-size.patch BuildRequires: boost-devel BuildRequires: cmake BuildRequires: desktop-file-utils