Accepting request 1247724 from X11:Wayland

OBS-URL: https://build.opensuse.org/request/show/1247724
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/mir?expand=0&rev=6
This commit is contained in:
Dominique Leuenberger 2025-02-21 21:01:21 +00:00 committed by Git OBS Bridge
commit 0c8fdc0ba2
4 changed files with 68 additions and 2 deletions

View File

@ -0,0 +1,27 @@
From b044fcc731d3b7f81ec7f8cb390a6fd928f0c5fb Mon Sep 17 00:00:00 2001
From: Alan Griffiths <alan@octopull.co.uk>
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;

View File

@ -0,0 +1,28 @@
From 73de77f186b03fea4906f4dd358deb21d5fb6889 Mon Sep 17 00:00:00 2001
From: Alan Griffiths <alan@octopull.co.uk>
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<shell::StreamSpecification>{};
spec.input_shape = std::vector<Rectangle>{};
spec.depth_layer = mir_depth_layer_overlay;

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Thu Feb 20 17:04:43 UTC 2025 - Shawn Dunn <sfalken@opensuse.org>
- 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 <sfalken@opensuse.org>

View File

@ -2,7 +2,7 @@
# spec file for package mir
#
# Copyright (c) 2024 SUSE LLC
# Copyright (c) Shawn W Dunn
# Copyright (c) Shawn W Dunn <sfalken@opensuse.org>
#
# 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