From a338ea9db38786f4110e514ecb9e4b9e0477a5cb Mon Sep 17 00:00:00 2001 From: Alan Griffiths Date: Fri, 16 Feb 2024 10:49:12 +0000 Subject: [PATCH 01/13] Merge pull request #3206 from canonical/fix-hw-cursor graphics/MultiplexingDisplay: Add HW cursor support. --- src/server/graphics/CMakeLists.txt | 2 + src/server/graphics/multiplexing_display.cpp | 21 +++++- .../graphics/multiplexing_hw_cursor.cpp | 68 +++++++++++++++++++ src/server/graphics/multiplexing_hw_cursor.h | 38 +++++++++++ 4 files changed, 128 insertions(+), 1 deletion(-) create mode 100644 src/server/graphics/multiplexing_hw_cursor.cpp create mode 100644 src/server/graphics/multiplexing_hw_cursor.h diff --git a/src/server/graphics/CMakeLists.txt b/src/server/graphics/CMakeLists.txt index 724d9cc414c..dd1dd588a38 100644 --- a/src/server/graphics/CMakeLists.txt +++ b/src/server/graphics/CMakeLists.txt @@ -16,6 +16,8 @@ add_library( platform_probe.h multiplexing_display.h multiplexing_display.cpp + multiplexing_hw_cursor.h + multiplexing_hw_cursor.cpp ) target_link_libraries(mirgraphics diff --git a/src/server/graphics/multiplexing_display.cpp b/src/server/graphics/multiplexing_display.cpp index 6bdb590baf4..0eb1ea783c4 100644 --- a/src/server/graphics/multiplexing_display.cpp +++ b/src/server/graphics/multiplexing_display.cpp @@ -15,11 +15,14 @@ */ #include "multiplexing_display.h" +#include "multiplexing_hw_cursor.h" #include "mir/graphics/display_configuration.h" #include "mir/renderer/gl/context.h" #include "mir/output_type_names.h" +#include "mir/log.h" #include +#include #include #include #include @@ -319,5 +322,21 @@ void mg::MultiplexingDisplay::resume() auto mg::MultiplexingDisplay::create_hardware_cursor() -> std::shared_ptr { - return {}; + std::vector platform_displays; + for (auto& display : displays) + { + platform_displays.push_back(display.get()); + } + try + { + return std::make_shared(platform_displays); + } + catch (std::exception const&) + { + mir::log( + mir::logging::Severity::informational, + "display", + "Failed to create hardware cursor"); + return nullptr; + } } diff --git a/src/server/graphics/multiplexing_hw_cursor.cpp b/src/server/graphics/multiplexing_hw_cursor.cpp new file mode 100644 index 00000000000..42ce795b6a6 --- /dev/null +++ b/src/server/graphics/multiplexing_hw_cursor.cpp @@ -0,0 +1,68 @@ +/* + * Copyright © Canonical Ltd. + * + * This program is free software: you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 or 3, + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "multiplexing_hw_cursor.h" + +#include "mir/graphics/display.h" +#include + +namespace mg = mir::graphics; + +namespace +{ +auto construct_platform_cursors(std::span platform_displays) -> std::vector> +{ + std::vector> cursors; + for (auto display : platform_displays) + { + cursors.push_back(display->create_hardware_cursor()); + if (cursors.back() == nullptr) + { + BOOST_THROW_EXCEPTION((std::runtime_error{"Platform failed to create hardware cursor"})); + } + } + return cursors; +} +} + +mg::MultiplexingCursor::MultiplexingCursor(std::span platform_displays) + : platform_cursors{construct_platform_cursors(platform_displays)} +{ +} + +void mg::MultiplexingCursor::show(CursorImage const& image) +{ + for (auto& cursor : platform_cursors) + { + cursor->show(image); + } +} + +void mg::MultiplexingCursor::hide() +{ + for (auto& cursor: platform_cursors) + { + cursor->hide(); + } +} + +void mg::MultiplexingCursor::move_to(geometry::Point position) +{ + for (auto& cursor : platform_cursors) + { + cursor->move_to(position); + } +} diff --git a/src/server/graphics/multiplexing_hw_cursor.h b/src/server/graphics/multiplexing_hw_cursor.h new file mode 100644 index 00000000000..f4e7b083c53 --- /dev/null +++ b/src/server/graphics/multiplexing_hw_cursor.h @@ -0,0 +1,38 @@ +/* + * Copyright © Canonical Ltd. + * + * This program is free software: you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 or 3, + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include +#include + +#include "mir/graphics/cursor.h" + +namespace mir::graphics +{ +class Display; + +class MultiplexingCursor : public Cursor +{ +public: + explicit MultiplexingCursor(std::span platform_displays); + + void show(CursorImage const& image) override; + void hide() override; + void move_to(geometry::Point position) override; + +private: + std::vector> const platform_cursors; +}; +} From d7fa473e52ea60743baa52d217e187a70b6a1c3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Sawicz?= Date: Fri, 23 Feb 2024 13:31:38 +0000 Subject: [PATCH 02/13] Merge pull request #3248 from canonical/ignore-zero-length-gamma Ignore zero length gamma curves --- src/platforms/gbm-kms/server/kms/real_kms_output.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/platforms/gbm-kms/server/kms/real_kms_output.cpp b/src/platforms/gbm-kms/server/kms/real_kms_output.cpp index d8896d2f4cf..8bef51c5c33 100644 --- a/src/platforms/gbm-kms/server/kms/real_kms_output.cpp +++ b/src/platforms/gbm-kms/server/kms/real_kms_output.cpp @@ -360,6 +360,12 @@ void mgg::RealKMSOutput::set_power_mode(MirPowerMode mode) void mgg::RealKMSOutput::set_gamma(mg::GammaCurves const& gamma) { + if (!gamma.red.size()) + { + mir::log_warning("Ignoring attempt to set zero length gamma"); + return; + } + if (!ensure_crtc()) { mir::log_warning("Output %s has no associated CRTC to set gamma on", From a4a1351ff49ba994a98427c19e845ff1ea47a0b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Sawicz?= Date: Thu, 29 Feb 2024 09:31:59 +0000 Subject: [PATCH 03/13] ci: add Alpine 3.19 (#3257) --- .github/workflows/spread.yml | 1 + spread.yaml | 1 + 2 files changed, 2 insertions(+) diff --git a/.github/workflows/spread.yml b/.github/workflows/spread.yml index 6ce0a545c81..74b5c315e42 100644 --- a/.github/workflows/spread.yml +++ b/.github/workflows/spread.yml @@ -37,6 +37,7 @@ jobs: fi TASKS+='"lxd:alpine-3.18:spread/build/alpine:amd64" + "lxd:alpine-3.19:spread/build/alpine:amd64" "lxd:alpine-edge:spread/build/alpine:amd64" "lxd:ubuntu-22.04:spread/build/sbuild:debian_sid" "lxd:ubuntu-22.04:spread/build/sbuild:ubuntu" diff --git a/spread.yaml b/spread.yaml index 74178da533d..09118c6b811 100644 --- a/spread.yaml +++ b/spread.yaml @@ -6,6 +6,7 @@ backends: lxd: systems: - alpine-3.18 + - alpine-3.19 - alpine-edge - ubuntu-22.04 - fedora-37 From 4373f4de2f529603420b6b0c11aa2a4b8f401ca0 Mon Sep 17 00:00:00 2001 From: Alan Griffiths Date: Thu, 7 Mar 2024 14:07:18 +0000 Subject: [PATCH 04/13] (#3236) `CPUCopyOutputSurface` now used a GL output layout (#3245) fixes https://github.com/canonical/mir/issues/3236 Am I right to think this @RAOF ? It looks like `CPUCopyOutputSurface` is trying to have a `GL` layout. I could be wrong, but this makes my screenshots work. ## Before ![2024-02-21T17:01:19,606591722-05:00](https://github.com/canonical/mir/assets/25062299/1835506f-6725-47d4-920a-f2fdcec4ce91) ## After ![2024-02-21T17:06:29,424484886-05:00](https://github.com/canonical/mir/assets/25062299/6dfbc1e2-8fcf-40e2-8913-7a610b9a5743) --- src/renderers/gl/renderer.cpp | 31 ++++++++++--------------------- 1 file changed, 10 insertions(+), 21 deletions(-) diff --git a/src/renderers/gl/renderer.cpp b/src/renderers/gl/renderer.cpp index 6d7bdce1038..c06c7ed35ec 100644 --- a/src/renderers/gl/renderer.cpp +++ b/src/renderers/gl/renderer.cpp @@ -382,29 +382,18 @@ void mrg::Renderer::draw(mg::Renderable const& renderable) const if (clip_area) { glEnable(GL_SCISSOR_TEST); - - // NOTE: We are handling the following two cases here: - // 1. The layout of the output surface matches that of the texture. - // The clip_area provided has the origin in the top-left corner of the screen, while OpenGL - // has the origin in the bottom-left corner of the screen. Hence, when the layout of the - // output surface matches that of the texture, we need to invert the provided clip_area. - // 2. The layout of the output surface DOES NOT match that of the texture. - // Note that the call to glViewport in update_gl_viewport will modify the behavior of glScissor. - // Hence, if the layouts do NOT match, then we do NOT need to invert the clip area. This - // is because we WANT the inverted layout which clip_area provides to us by default. - auto const invert_clip_area = (output_surface->layout() == graphics::gl::OutputSurface::Layout::TopRowFirst) == - (texture->layout() == mg::gl::Texture::Layout::TopRowFirst); - auto const scissor_y = invert_clip_area ? - viewport.top_left.y.as_int() + - viewport.size.height.as_int() - - clip_area.value().top_left.y.as_int() - - clip_area.value().size.height.as_int() : - clip_area.value().top_left.y.as_int(); + auto clip_x = clip_area.value().top_left.x.as_int(); + // The Y-coordinate is always relative to the top, so we make it relative to the bottom. + auto clip_y = viewport.top_left.y.as_int() + + viewport.size.height.as_int() - + clip_area.value().top_left.y.as_int() - + clip_area.value().size.height.as_int(); + glm::vec4 clip_pos(clip_x, clip_y, 0, 1); + clip_pos = display_transform * clip_pos; glScissor( - clip_area.value().top_left.x.as_int() - - viewport.top_left.x.as_int(), - scissor_y, + (int)clip_pos.x - viewport.top_left.x.as_int(), + (int)clip_pos.y, clip_area.value().size.width.as_int(), clip_area.value().size.height.as_int() ); From 6a7c962dd58fa089d6f14efd400df4241160dcc4 Mon Sep 17 00:00:00 2001 From: Alan Griffiths Date: Tue, 19 Mar 2024 16:38:53 +0000 Subject: [PATCH 05/13] (#3259) buffer size should be the possibly-inverted extents size so that the final image is correct (#3292) fixes #3259 # Screenshots ## Left ![20240318_15h54m23s_grim](https://github.com/canonical/mir/assets/25062299/7815dfb9-ed03-491f-8422-e417d5d39d3b) ## Right ![20240318_15h54m44s_grim](https://github.com/canonical/mir/assets/25062299/412bd5a8-4935-4c4f-8c9a-6c710bf232b4) ## Inverted (Scaled) ![20240318_15h55m27s_grim](https://github.com/canonical/mir/assets/25062299/4bd4a102-c666-431f-86f8-ec005d3c457a) ## Normal ![20240318_15h56m07s_grim](https://github.com/canonical/mir/assets/25062299/f50be354-d664-4589-a75a-63e818d8597f) --- src/server/frontend_wayland/wlr_screencopy_v1.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/server/frontend_wayland/wlr_screencopy_v1.cpp b/src/server/frontend_wayland/wlr_screencopy_v1.cpp index 67dd39096b4..cff792bcfa1 100644 --- a/src/server/frontend_wayland/wlr_screencopy_v1.cpp +++ b/src/server/frontend_wayland/wlr_screencopy_v1.cpp @@ -378,8 +378,7 @@ void mf::WlrScreencopyManagerV1::capture_output( (void)overlay_cursor; auto const& output_config = OutputGlobal::from_or_throw(output).current_config(); auto const extents = output_config.extents(); - auto const buffer_size = output_config.modes[output_config.current_mode_index].size; - new WlrScreencopyFrameV1{frame, this, ctx, {output, extents, buffer_size}}; + new WlrScreencopyFrameV1{frame, this, ctx, {output, extents, extents.size}}; } void mf::WlrScreencopyManagerV1::capture_output_region( @@ -393,8 +392,7 @@ void mf::WlrScreencopyManagerV1::capture_output_region( auto const& output_config = OutputGlobal::from_or_throw(output).current_config(); auto const extents = output_config.extents(); auto const intersection = intersection_of({{x, y}, {width, height}}, extents); - auto const output_size = output_config.modes[output_config.current_mode_index].size; - auto const buffer_size = translate_and_scale(intersection, extents, {{}, output_size}).size; + auto const buffer_size = translate_and_scale(intersection, extents, {{}, extents.size}).size; new WlrScreencopyFrameV1{frame, this, ctx, {output, intersection, buffer_size}}; } From 3efb89b195bbee93b09d43a073bfc1faa88b116f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Sawicz?= Date: Tue, 26 Mar 2024 21:32:11 +0000 Subject: [PATCH 06/13] Fix propagation of custom attributes on outputs (#3294) Fixes: https://github.com/canonical/ubuntu-frame/issues/172 --- .github/workflows/spread.yml | 1 - spread.yaml | 1 - src/miral/static_display_config.cpp | 33 +++++++++++++++----- src/server/graphics/multiplexing_display.cpp | 2 +- 4 files changed, 27 insertions(+), 10 deletions(-) diff --git a/.github/workflows/spread.yml b/.github/workflows/spread.yml index 74b5c315e42..24c516f41b0 100644 --- a/.github/workflows/spread.yml +++ b/.github/workflows/spread.yml @@ -45,7 +45,6 @@ jobs: "lxd:ubuntu-22.04:spread/build/sbuild:ubuntu_arm64" "lxd:ubuntu-22.04:spread/build/sbuild:ubuntu_armhf" "lxd:ubuntu-22.04:spread/build/ubuntu:clang" - "lxd:fedora-37:spread/build/fedora:amd64" "lxd:fedora-38:spread/build/fedora:amd64" "lxd:fedora-39:spread/build/fedora:amd64" "lxd:fedora-rawhide:spread/build/fedora:amd64" diff --git a/spread.yaml b/spread.yaml index 09118c6b811..7f913a2e44f 100644 --- a/spread.yaml +++ b/spread.yaml @@ -9,7 +9,6 @@ backends: - alpine-3.19 - alpine-edge - ubuntu-22.04 - - fedora-37 - fedora-38 - fedora-39 - fedora-rawhide: diff --git a/src/miral/static_display_config.cpp b/src/miral/static_display_config.cpp index 0e2ebdc2f45..a9d50de96ed 100644 --- a/src/miral/static_display_config.cpp +++ b/src/miral/static_display_config.cpp @@ -307,15 +307,26 @@ void miral::YamlFileDisplayConfig::apply_to(mg::DisplayConfiguration& conf) apply_to_output(conf_output, config[conf_output.name]); }); } - else if (i != std::end(layout_strategies)) - { - mir::log_debug("Display config using layout strategy: '%s'", layout.c_str()); - } else { - mir::log_warning("Display config does not contain layout '%s'", layout.c_str()); - mir::log_debug("Display config using layout strategy: 'default'"); - apply_default_configuration(conf); + conf.for_each_output([this](mg::UserDisplayConfigurationOutput& conf_output) + { + for (auto const& key : custom_output_attributes) + { + conf_output.custom_attribute[key] = std::nullopt; + } + }); + + if (i != std::end(layout_strategies)) + { + mir::log_debug("Display config using layout strategy: '%s'", layout.c_str()); + } + else + { + mir::log_warning("Display config does not contain layout '%s'", layout.c_str()); + mir::log_debug("Display config using layout strategy: 'default'"); + apply_default_configuration(conf); + } } std::ostringstream out; @@ -394,6 +405,14 @@ void miral::YamlFileDisplayConfig::serialize_output_configuration( << "\n group: " << conf_output.logical_group_id.as_value() << "\t# Outputs with the same non-zero value are treated as a single display"; } + + for (auto const& [key, value] : conf_output.custom_attribute) + { + if (value) + { + out << "\n " << key << ": " << value.value(); + } + } } else { diff --git a/src/server/graphics/multiplexing_display.cpp b/src/server/graphics/multiplexing_display.cpp index 0eb1ea783c4..491e4999585 100644 --- a/src/server/graphics/multiplexing_display.cpp +++ b/src/server/graphics/multiplexing_display.cpp @@ -91,7 +91,7 @@ class CompositeDisplayConfiguration : public mg::DisplayConfiguration // MirSubpixelArrangement is mistakenly non-const? output.gamma = mutable_output.gamma; output.custom_logical_size = mutable_output.custom_logical_size; - output.custom_attribute = std::move(mutable_output.custom_attribute); + output.custom_attribute = mutable_output.custom_attribute; }); } } From 03335a6e64ad261a7680bee74eec54a27a8d6dc6 Mon Sep 17 00:00:00 2001 From: Matthew Kosarek Date: Wed, 27 Mar 2024 14:49:50 -0400 Subject: [PATCH 07/13] version: update version to 2.16.4 and update changelog --- CMakeLists.txt | 2 +- debian/changelog | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9980a4b3d85..fd2e2853de4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -26,7 +26,7 @@ set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib) set(MIR_VERSION_MAJOR 2) set(MIR_VERSION_MINOR 16) -set(MIR_VERSION_PATCH 3) +set(MIR_VERSION_PATCH 4) add_compile_definitions(MIR_VERSION_MAJOR=${MIR_VERSION_MAJOR}) add_compile_definitions(MIR_VERSION_MINOR=${MIR_VERSION_MINOR}) diff --git a/debian/changelog b/debian/changelog index 0c7c6236e03..861e633fa61 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,17 @@ +mir (2.16.4) UNRELEASED; urgency=medium + + * Bugfix release: + - Add hardware cursor support (Fixes: #3198) + - Better support for automated platform selection. This means that hybrid + graphics situations (especially with Nvidia) will work much better out + of the box. + - Screenshots now respect clipping areas and rotated outputs (Fixes: #3236) + (Fixes: #3259) + - Fixed the propagation of custom attributes on outputs + (Fixes: https://github.com/canonical/ubuntu-frame/issues/172) + + -- Matthew Kosarek Wed, 27 Mar 2024 14:34:35 -0500 + mir (2.16.3) UNRELEASED; urgency=medium * Bugfix release: From 967d872daab50d845adce389c0672edfd18b90c9 Mon Sep 17 00:00:00 2001 From: Matthew Kosarek Date: Wed, 27 Mar 2024 16:19:57 -0400 Subject: [PATCH 08/13] testing: ignore surfaces_with_exclusive_zone_set_to_negative_one_do_not_respect_other_exclusive_zones WLCS test --- tests/acceptance-tests/wayland/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/acceptance-tests/wayland/CMakeLists.txt b/tests/acceptance-tests/wayland/CMakeLists.txt index caaedda69d7..3ee36ba629a 100644 --- a/tests/acceptance-tests/wayland/CMakeLists.txt +++ b/tests/acceptance-tests/wayland/CMakeLists.txt @@ -98,6 +98,7 @@ set(EXPECTED_FAILURES XdgToplevelStableTest.pointer_leaves_surface_during_interactive_resize XdgToplevelV6Test.pointer_leaves_surface_during_interactive_move XdgToplevelV6Test.pointer_leaves_surface_during_interactive_resize + Anchor/LayerSurfaceLayoutTest.surfaces_with_exclusive_zone_set_to_negative_one_do_not_respect_other_exclusive_zones/* AllSurfaceTypes/TouchTest.sends_touch_up_on_surface_destroy/4 # Fixed by https://github.com/MirServer/wlcs/pull/199 AllSurfaceTypes/TouchTest.sends_touch_up_on_surface_destroy/5 # Fixed by https://github.com/MirServer/wlcs/pull/199 From 6aea3d2174b4bc38fe8256c23f47ab5f7801de87 Mon Sep 17 00:00:00 2001 From: Alan Griffiths Date: Mon, 18 Mar 2024 09:17:15 +0000 Subject: [PATCH 09/13] tests/open_wrapper: Handle the Ubuntu 64-bit time_t apocalypse (#3290) We're *mostly* insulated from this, but our tests need to intercept calls to `open`, which means that we're exposed to some glibc internals that change under `_TIME_BITS=64`. Fortunately umockdev in the archive has already hit this, so adapt that fix to our use. Fixes: #3285 --- tests/mir_test_framework/open_wrapper.cpp | 61 +++++++++++++++++++++-- 1 file changed, 56 insertions(+), 5 deletions(-) diff --git a/tests/mir_test_framework/open_wrapper.cpp b/tests/mir_test_framework/open_wrapper.cpp index 06625d56c42..9d2c408d206 100644 --- a/tests/mir_test_framework/open_wrapper.cpp +++ b/tests/mir_test_framework/open_wrapper.cpp @@ -14,12 +14,45 @@ * along with this program. If not, see . */ -/* As suggested by umockdev, _FILE_OFFSET_BITS breaks our open() interposing, - * as it results in a (platform dependent!) subset of {__open64, __open64_2, - * __open, __open_2} being defined (not just declared) in the header, causing - * the build to fail with duplicate definitions. + +/* Because we're trying to interpose libc functions we get exposed to the + * implementation details of glibc. + * + * Due to the 64-bit time_t transition, our previous workaround of + * #undef _FILE_OFFSET_BITS (and thus getting the base entrypoints) + * no longer works; _FILE_OFFSET_BITS must be 64 if _TIME_BITS == 64, + * and it's hard to verify that none of the subsequent headers *don't* + * embed a time_t somewhere. + * + * These runes are taken from the Ubuntu umockdev patch solving the same + * problem there. + */ +#include +#ifdef __GLIBC__ /* This is messing with glibc internals, and is not + * expected to work (or be needed) anywhere else. + * (Hello, musl!) + */ +/* Remove gcc asm aliasing so that our interposed symbols work as expected */ +#include + +#include +extern "C" +{ +extern int __REDIRECT_NTH (__ttyname_r_alias, (int __fd, char *__buf, + size_t __buflen), ttyname_r); +} +#ifdef __REDIRECT +#undef __REDIRECT +#endif +#define __REDIRECT(name, proto, alias) name proto +#ifdef __REDIRECT_NTH +#undef __REDIRECT_NTH +#endif +#define __REDIRECT_NTH(name, proto, alias) name proto __THROW +#endif // __GLIBC__ +/* + * End glibc hackery (although there is a second block below) */ -#undef _FILE_OFFSET_BITS #include "mir_test_framework/open_wrapper.h" #include "mir_test_framework/interposer_helper.h" @@ -32,6 +65,24 @@ #include #include +/* Second block of glibc hackery + * + * Fixup for making a mess with __REDIRECT above + */ +#ifdef __GLIBC__ +#ifdef __USE_TIME_BITS64 +#define clock_gettime __clock_gettime64 +extern "C" +{ +extern int clock_gettime(clockid_t clockid, struct timespec *tp); +} +#endif +#endif // __GLIBC__ +/* + * End glibc hackery + */ + + namespace mtf = mir_test_framework; namespace From b864aa9d99f616275e2c35a7a8207815adff28f1 Mon Sep 17 00:00:00 2001 From: Matthew Kosarek Date: Thu, 28 Mar 2024 09:45:40 -0400 Subject: [PATCH 10/13] debian: update changelog to better reflect changes for 2.16.4 --- debian/changelog | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/debian/changelog b/debian/changelog index 861e633fa61..053e7970b48 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,14 +1,15 @@ mir (2.16.4) UNRELEASED; urgency=medium * Bugfix release: + - Ignoring zero length gamma curves for KMS outputs (Fixes: #3238) - Add hardware cursor support (Fixes: #3198) - - Better support for automated platform selection. This means that hybrid - graphics situations (especially with Nvidia) will work much better out - of the box. - Screenshots now respect clipping areas and rotated outputs (Fixes: #3236) (Fixes: #3259) - - Fixed the propagation of custom attributes on outputs + - Fixed custom attributes propagation on outputs (Fixes: https://github.com/canonical/ubuntu-frame/issues/172) + - Handle the Ubuntu 64-bit time_t apocalypse (Fixes: #3285) + - Fix for eglQueryDmaBufModifiersEXT spuriously returns EGL_BAD_PARAMETER for a few formats on Nvidia + (Fixes: #3278) -- Matthew Kosarek Wed, 27 Mar 2024 14:34:35 -0500 From 932d8744852bca9830668018474890bce0c5f6d6 Mon Sep 17 00:00:00 2001 From: Matthew Kosarek Date: Thu, 28 Mar 2024 11:08:37 -0400 Subject: [PATCH 11/13] ci: gtest filter should ignore all exclusive zones tests until merged back into main --- tests/acceptance-tests/wayland/CMakeLists.txt | 33 ++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/tests/acceptance-tests/wayland/CMakeLists.txt b/tests/acceptance-tests/wayland/CMakeLists.txt index 3ee36ba629a..7eea4f26e74 100644 --- a/tests/acceptance-tests/wayland/CMakeLists.txt +++ b/tests/acceptance-tests/wayland/CMakeLists.txt @@ -98,7 +98,38 @@ set(EXPECTED_FAILURES XdgToplevelStableTest.pointer_leaves_surface_during_interactive_resize XdgToplevelV6Test.pointer_leaves_surface_during_interactive_move XdgToplevelV6Test.pointer_leaves_surface_during_interactive_resize - Anchor/LayerSurfaceLayoutTest.surfaces_with_exclusive_zone_set_to_negative_one_do_not_respect_other_exclusive_zones/* + Anchor/LayerSurfaceLayoutTest.surfaces_with_exclusive_zone_set_to_negative_one_do_not_respect_other_exclusive_zones/0 + Anchor/LayerSurfaceLayoutTest.surfaces_with_exclusive_zone_set_to_negative_one_do_not_respect_other_exclusive_zones/1 + Anchor/LayerSurfaceLayoutTest.surfaces_with_exclusive_zone_set_to_negative_one_do_not_respect_other_exclusive_zones/2 + Anchor/LayerSurfaceLayoutTest.surfaces_with_exclusive_zone_set_to_negative_one_do_not_respect_other_exclusive_zones/3 + Anchor/LayerSurfaceLayoutTest.surfaces_with_exclusive_zone_set_to_negative_one_do_not_respect_other_exclusive_zones/4 + Anchor/LayerSurfaceLayoutTest.surfaces_with_exclusive_zone_set_to_negative_one_do_not_respect_other_exclusive_zones/5 + Anchor/LayerSurfaceLayoutTest.surfaces_with_exclusive_zone_set_to_negative_one_do_not_respect_other_exclusive_zones/6 + Anchor/LayerSurfaceLayoutTest.surfaces_with_exclusive_zone_set_to_negative_one_do_not_respect_other_exclusive_zones/7 + Anchor/LayerSurfaceLayoutTest.surfaces_with_exclusive_zone_set_to_negative_one_do_not_respect_other_exclusive_zones/8 + Anchor/LayerSurfaceLayoutTest.surfaces_with_exclusive_zone_set_to_negative_one_do_not_respect_other_exclusive_zones/9 + Anchor/LayerSurfaceLayoutTest.surfaces_with_exclusive_zone_set_to_negative_one_do_not_respect_other_exclusive_zones/10 + Anchor/LayerSurfaceLayoutTest.surfaces_with_exclusive_zone_set_to_negative_one_do_not_respect_other_exclusive_zones/11 + Anchor/LayerSurfaceLayoutTest.surfaces_with_exclusive_zone_set_to_negative_one_do_not_respect_other_exclusive_zones/12 + Anchor/LayerSurfaceLayoutTest.surfaces_with_exclusive_zone_set_to_negative_one_do_not_respect_other_exclusive_zones/13 + Anchor/LayerSurfaceLayoutTest.surfaces_with_exclusive_zone_set_to_negative_one_do_not_respect_other_exclusive_zones/14 + Anchor/LayerSurfaceLayoutTest.surfaces_with_exclusive_zone_set_to_negative_one_do_not_respect_other_exclusive_zones/15 + Anchor/LayerSurfaceLayoutTest.surfaces_with_exclusive_zone_set_to_negative_one_do_not_respect_other_exclusive_zones/16 + Anchor/LayerSurfaceLayoutTest.surfaces_with_exclusive_zone_set_to_negative_one_do_not_respect_other_exclusive_zones/17 + Anchor/LayerSurfaceLayoutTest.surfaces_with_exclusive_zone_set_to_negative_one_do_not_respect_other_exclusive_zones/18 + Anchor/LayerSurfaceLayoutTest.surfaces_with_exclusive_zone_set_to_negative_one_do_not_respect_other_exclusive_zones/19 + Anchor/LayerSurfaceLayoutTest.surfaces_with_exclusive_zone_set_to_negative_one_do_not_respect_other_exclusive_zones/20 + Anchor/LayerSurfaceLayoutTest.surfaces_with_exclusive_zone_set_to_negative_one_do_not_respect_other_exclusive_zones/21 + Anchor/LayerSurfaceLayoutTest.surfaces_with_exclusive_zone_set_to_negative_one_do_not_respect_other_exclusive_zones/22 + Anchor/LayerSurfaceLayoutTest.surfaces_with_exclusive_zone_set_to_negative_one_do_not_respect_other_exclusive_zones/23 + Anchor/LayerSurfaceLayoutTest.surfaces_with_exclusive_zone_set_to_negative_one_do_not_respect_other_exclusive_zones/24 + Anchor/LayerSurfaceLayoutTest.surfaces_with_exclusive_zone_set_to_negative_one_do_not_respect_other_exclusive_zones/25 + Anchor/LayerSurfaceLayoutTest.surfaces_with_exclusive_zone_set_to_negative_one_do_not_respect_other_exclusive_zones/26 + Anchor/LayerSurfaceLayoutTest.surfaces_with_exclusive_zone_set_to_negative_one_do_not_respect_other_exclusive_zones/27 + Anchor/LayerSurfaceLayoutTest.surfaces_with_exclusive_zone_set_to_negative_one_do_not_respect_other_exclusive_zones/28 + Anchor/LayerSurfaceLayoutTest.surfaces_with_exclusive_zone_set_to_negative_one_do_not_respect_other_exclusive_zones/29 + Anchor/LayerSurfaceLayoutTest.surfaces_with_exclusive_zone_set_to_negative_one_do_not_respect_other_exclusive_zones/30 + Anchor/LayerSurfaceLayoutTest.surfaces_with_exclusive_zone_set_to_negative_one_do_not_respect_other_exclusive_zones/31 AllSurfaceTypes/TouchTest.sends_touch_up_on_surface_destroy/4 # Fixed by https://github.com/MirServer/wlcs/pull/199 AllSurfaceTypes/TouchTest.sends_touch_up_on_surface_destroy/5 # Fixed by https://github.com/MirServer/wlcs/pull/199 From fbad5e50be02992f6cf1f41f928950532f3f62c5 Mon Sep 17 00:00:00 2001 From: Matthew Kosarek Date: Thu, 28 Mar 2024 11:34:38 -0400 Subject: [PATCH 12/13] ci: surfaces_with_exclusive_zone_set_to_negative_one_do_not_respect_other_exclusive_zones WLCS tests needed to be excluded entirely as they spuriously fail --- tests/acceptance-tests/wayland/CMakeLists.txt | 33 +------------------ 1 file changed, 1 insertion(+), 32 deletions(-) diff --git a/tests/acceptance-tests/wayland/CMakeLists.txt b/tests/acceptance-tests/wayland/CMakeLists.txt index 7eea4f26e74..65e2edb0b4f 100644 --- a/tests/acceptance-tests/wayland/CMakeLists.txt +++ b/tests/acceptance-tests/wayland/CMakeLists.txt @@ -98,38 +98,6 @@ set(EXPECTED_FAILURES XdgToplevelStableTest.pointer_leaves_surface_during_interactive_resize XdgToplevelV6Test.pointer_leaves_surface_during_interactive_move XdgToplevelV6Test.pointer_leaves_surface_during_interactive_resize - Anchor/LayerSurfaceLayoutTest.surfaces_with_exclusive_zone_set_to_negative_one_do_not_respect_other_exclusive_zones/0 - Anchor/LayerSurfaceLayoutTest.surfaces_with_exclusive_zone_set_to_negative_one_do_not_respect_other_exclusive_zones/1 - Anchor/LayerSurfaceLayoutTest.surfaces_with_exclusive_zone_set_to_negative_one_do_not_respect_other_exclusive_zones/2 - Anchor/LayerSurfaceLayoutTest.surfaces_with_exclusive_zone_set_to_negative_one_do_not_respect_other_exclusive_zones/3 - Anchor/LayerSurfaceLayoutTest.surfaces_with_exclusive_zone_set_to_negative_one_do_not_respect_other_exclusive_zones/4 - Anchor/LayerSurfaceLayoutTest.surfaces_with_exclusive_zone_set_to_negative_one_do_not_respect_other_exclusive_zones/5 - Anchor/LayerSurfaceLayoutTest.surfaces_with_exclusive_zone_set_to_negative_one_do_not_respect_other_exclusive_zones/6 - Anchor/LayerSurfaceLayoutTest.surfaces_with_exclusive_zone_set_to_negative_one_do_not_respect_other_exclusive_zones/7 - Anchor/LayerSurfaceLayoutTest.surfaces_with_exclusive_zone_set_to_negative_one_do_not_respect_other_exclusive_zones/8 - Anchor/LayerSurfaceLayoutTest.surfaces_with_exclusive_zone_set_to_negative_one_do_not_respect_other_exclusive_zones/9 - Anchor/LayerSurfaceLayoutTest.surfaces_with_exclusive_zone_set_to_negative_one_do_not_respect_other_exclusive_zones/10 - Anchor/LayerSurfaceLayoutTest.surfaces_with_exclusive_zone_set_to_negative_one_do_not_respect_other_exclusive_zones/11 - Anchor/LayerSurfaceLayoutTest.surfaces_with_exclusive_zone_set_to_negative_one_do_not_respect_other_exclusive_zones/12 - Anchor/LayerSurfaceLayoutTest.surfaces_with_exclusive_zone_set_to_negative_one_do_not_respect_other_exclusive_zones/13 - Anchor/LayerSurfaceLayoutTest.surfaces_with_exclusive_zone_set_to_negative_one_do_not_respect_other_exclusive_zones/14 - Anchor/LayerSurfaceLayoutTest.surfaces_with_exclusive_zone_set_to_negative_one_do_not_respect_other_exclusive_zones/15 - Anchor/LayerSurfaceLayoutTest.surfaces_with_exclusive_zone_set_to_negative_one_do_not_respect_other_exclusive_zones/16 - Anchor/LayerSurfaceLayoutTest.surfaces_with_exclusive_zone_set_to_negative_one_do_not_respect_other_exclusive_zones/17 - Anchor/LayerSurfaceLayoutTest.surfaces_with_exclusive_zone_set_to_negative_one_do_not_respect_other_exclusive_zones/18 - Anchor/LayerSurfaceLayoutTest.surfaces_with_exclusive_zone_set_to_negative_one_do_not_respect_other_exclusive_zones/19 - Anchor/LayerSurfaceLayoutTest.surfaces_with_exclusive_zone_set_to_negative_one_do_not_respect_other_exclusive_zones/20 - Anchor/LayerSurfaceLayoutTest.surfaces_with_exclusive_zone_set_to_negative_one_do_not_respect_other_exclusive_zones/21 - Anchor/LayerSurfaceLayoutTest.surfaces_with_exclusive_zone_set_to_negative_one_do_not_respect_other_exclusive_zones/22 - Anchor/LayerSurfaceLayoutTest.surfaces_with_exclusive_zone_set_to_negative_one_do_not_respect_other_exclusive_zones/23 - Anchor/LayerSurfaceLayoutTest.surfaces_with_exclusive_zone_set_to_negative_one_do_not_respect_other_exclusive_zones/24 - Anchor/LayerSurfaceLayoutTest.surfaces_with_exclusive_zone_set_to_negative_one_do_not_respect_other_exclusive_zones/25 - Anchor/LayerSurfaceLayoutTest.surfaces_with_exclusive_zone_set_to_negative_one_do_not_respect_other_exclusive_zones/26 - Anchor/LayerSurfaceLayoutTest.surfaces_with_exclusive_zone_set_to_negative_one_do_not_respect_other_exclusive_zones/27 - Anchor/LayerSurfaceLayoutTest.surfaces_with_exclusive_zone_set_to_negative_one_do_not_respect_other_exclusive_zones/28 - Anchor/LayerSurfaceLayoutTest.surfaces_with_exclusive_zone_set_to_negative_one_do_not_respect_other_exclusive_zones/29 - Anchor/LayerSurfaceLayoutTest.surfaces_with_exclusive_zone_set_to_negative_one_do_not_respect_other_exclusive_zones/30 - Anchor/LayerSurfaceLayoutTest.surfaces_with_exclusive_zone_set_to_negative_one_do_not_respect_other_exclusive_zones/31 AllSurfaceTypes/TouchTest.sends_touch_up_on_surface_destroy/4 # Fixed by https://github.com/MirServer/wlcs/pull/199 AllSurfaceTypes/TouchTest.sends_touch_up_on_surface_destroy/5 # Fixed by https://github.com/MirServer/wlcs/pull/199 @@ -157,6 +125,7 @@ set(BROKEN_TESTS # See https://github.com/MirServer/wlcs/issues/293 # (Tests pass with https://github.com/MirServer/wlcs/pull/294) VirtualPointerV1Test.* + Anchor/LayerSurfaceLayoutTest.surfaces_with_exclusive_zone_set_to_negative_one_do_not_respect_other_exclusive_zones/* ) if (MIR_RUN_WLCS_TESTS) From 994e25eabf2850b53017195e9136de5e4a8660c5 Mon Sep 17 00:00:00 2001 From: Alan Griffiths Date: Wed, 3 Apr 2024 11:42:47 +0100 Subject: [PATCH 13/13] Drop dropped fix from changelog --- debian/changelog | 2 -- 1 file changed, 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 053e7970b48..023270d10f5 100644 --- a/debian/changelog +++ b/debian/changelog @@ -8,8 +8,6 @@ mir (2.16.4) UNRELEASED; urgency=medium - Fixed custom attributes propagation on outputs (Fixes: https://github.com/canonical/ubuntu-frame/issues/172) - Handle the Ubuntu 64-bit time_t apocalypse (Fixes: #3285) - - Fix for eglQueryDmaBufModifiersEXT spuriously returns EGL_BAD_PARAMETER for a few formats on Nvidia - (Fixes: #3278) -- Matthew Kosarek Wed, 27 Mar 2024 14:34:35 -0500