Skip to content

Commit

Permalink
Merge pull request #3119 from MirServer/release/2.13.1
Browse files Browse the repository at this point in the history
2.13.1 bugfix
  • Loading branch information
Saviq authored Dec 7, 2023
2 parents 1e1161f + 0f7d168 commit 2952a92
Show file tree
Hide file tree
Showing 9 changed files with 76 additions and 89 deletions.
13 changes: 2 additions & 11 deletions .github/workflows/spread.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,20 +34,11 @@ jobs:
"lxd:ubuntu-20.04:spread/build/ubuntu:ubsan_clang"'
fi
TASKS+='"lxd:alpine-3.17: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"
"lxd:ubuntu-22.04:spread/build/sbuild:ubuntu_jammy"
TASKS+='"lxd:ubuntu-22.04:spread/build/sbuild:ubuntu"
"lxd:ubuntu-22.04:spread/build/sbuild:ubuntu_arm64"
"lxd:ubuntu-22.04:spread/build/sbuild:ubuntu_armhf"
"lxd:ubuntu-20.04:spread/build/ubuntu:rpi"
"lxd:ubuntu-20.04:spread/build/ubuntu:clang"
"lxd:fedora-36:spread/build/fedora:amd64"
"lxd:fedora-37:spread/build/fedora:amd64"
"lxd:fedora-rawhide:spread/build/fedora:amd64"
"lxd:ubuntu-22.04:spread/build/sbuild:ubuntu_devel"
"lxd:ubuntu-22.04:spread/build/sbuild:ubuntu_proposed"'
"lxd:ubuntu-20.04:spread/build/ubuntu:clang"'
echo ${TASKS:-} | jq -cs '{ "spread-task": . }' | awk '{ print "matrix=" $0 }' >> $GITHUB_OUTPUT
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)

set(MIR_VERSION_MAJOR 2)
set(MIR_VERSION_MINOR 13)
set(MIR_VERSION_PATCH 0)
set(MIR_VERSION_PATCH 1)

add_compile_definitions(MIR_VERSION_MAJOR=${MIR_VERSION_MAJOR})
add_compile_definitions(MIR_VERSION_MINOR=${MIR_VERSION_MINOR})
Expand Down
27 changes: 27 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,30 @@
mir (2.13.1) UNRELEASED; urgency=medium

[ Alan Griffiths ]
* New upstream release 2.13.1

- ABI summary:
. miral ABI unchanged at 5
. mircommon ABI unchanged at 9
. mircookie ABI unchanged at 2
. mircore ABI unchanged at 2
. miroil ABI unchanged at 3
. mirplatform ABI unchanged at 24
. mirserver ABI unchanged at 58
. mirwayland ABI unchanged at 3
. mirplatformgraphics ABI unchanged at 20
. mirinputplatform ABI unchanged at 8
- Bugs fixed:
. Unable to close miral-shell using keybind via VNC due to
DecorationProvider (Fixes #3070)
. [input] keyboard meta key state gets out of step (Fixes: #2837)
. [platforms] Handle libinput device rejections better #2927
. [platforms] Assume evdev platform is supported (Fixes: #2837)
. [platforms] Fix naming of outputs on Nvidia cards (Fixes: #2968)
. server/ShmBacking: Fix leak in `install_sigbus_handler` #2895

-- Alan Griffiths <alan.griffiths@canonical.com> Thu, 06 Nov 2023 17:000:57 +0200

mir (2.13.0) UNRELEASED; urgency=medium

[ Alan Griffiths ]
Expand Down
2 changes: 1 addition & 1 deletion src/miral/runner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ void miral::MirRunner::stop()

if (auto const server = self->weak_server.lock())
{
server->stop();
server->the_main_loop()->enqueue(this, [server] { server->stop(); });
}
}

Expand Down
27 changes: 26 additions & 1 deletion src/platforms/eglstream-kms/server/kms_display_configuration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,16 @@
#include "kms-utils/drm_mode_resources.h"
#include "mir/graphics/pixel_format_utils.h"
#include "mir/graphics/egl_error.h"
#include "mir/graphics/pixel_format_utils.h"
#include "mir/output_type_names.h"

#include <cmath>
#include <limits>

#include <boost/throw_exception.hpp>
#include <stdexcept>
#include <algorithm>
#include <sstream>
#include <stdexcept>

namespace mg = mir::graphics;
namespace mge = mir::graphics::eglstream;
Expand Down Expand Up @@ -72,6 +75,26 @@ kms_connector_type_to_output_type(uint32_t connector_type)
return static_cast<mg::DisplayConfigurationOutputType>(connector_type);
}

void name_outputs(std::vector<std::shared_ptr<mge::kms::EGLOutput>>& outputs)
{
std::map<mg::DisplayConfigurationCardId, std::map<mg::DisplayConfigurationOutputType, int>> card_map;

for (auto& output : outputs)
{
auto const type = output->type;
auto const index_by_type = ++card_map[output->card_id][type];

std::ostringstream out;

out << mir::output_type_name(static_cast<unsigned>(type));
if ((*output).card_id.as_value() > 0)
out << '-' << output->card_id.as_value();
out << '-' << index_by_type;

output->name = out.str();
}
}

std::vector<std::shared_ptr<mge::kms::EGLOutput>> create_outputs(int drm_fd, EGLDisplay display)
{
mgk::DRMModeResources resources{drm_fd};
Expand Down Expand Up @@ -151,6 +174,8 @@ std::vector<std::shared_ptr<mge::kms::EGLOutput>> create_outputs(int drm_fd, EGL
output->used = false;
}

name_outputs(outputs);

return outputs;
}

Expand Down
7 changes: 4 additions & 3 deletions src/platforms/evdev/platform.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,6 @@ class InputDeviceObserver : public mir::Device::Observer
&device_watchers = device_watchers
]() mutable
{
auto raw_fd = static_cast<int>(fd);
device_fds.store_fd(devnode.c_str(), std::move(fd));

auto pending_iter = pending_devices.find(devnum);
Expand All @@ -199,8 +198,10 @@ class InputDeviceObserver : public mir::Device::Observer

if (!libinput_path_add_device(lib.get(), devnode.c_str()))
{
// Oops, libinput didn't want this after all.
device_fds.remove_fd(raw_fd);
/* Oops, libinput didn't want this after all.
* libinput will have closed the FD as a part of failing to add
* the device, so we only need to release our Device handle.
*/
device_watchers.erase(devnum);
}
});
Expand Down
64 changes: 2 additions & 62 deletions src/platforms/evdev/platform_factory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,63 +37,6 @@ mir::ModuleProperties const description = {
MIR_VERSION_MICRO,
mir::libname()
};

bool can_open_input_devices(mir::ConsoleServices& console)
{
mu::Enumerator input_enumerator{std::make_shared<mu::Context>()};
input_enumerator.match_subsystem("input");
input_enumerator.scan_devices();

bool device_found = false;

for (auto& device : input_enumerator)
{
if (device.devnode() != nullptr)
{
class Observer : public mir::Device::Observer
{
public:
Observer(mir::Fd& to_store)
: fd{to_store},
triggered{false}
{
}

void activated(mir::Fd&& device_fd) override
{
if (!triggered.exchange(true))
{
fd = std::move(device_fd);
}
}

void suspended() override
{
}

void removed() override
{
}

private:
mir::Fd& fd;
std::atomic<bool> triggered;
};
device_found = true;
mir::Fd input_device;

console.acquire_device(
major(device.devnum()),
minor(device.devnum()),
std::make_unique<Observer>(input_device)).get();

if (input_device > 0)
return true;
}
}
return ! device_found;
}

}

mir::UniqueModulePtr<mi::Platform> create_input_platform(
Expand All @@ -120,13 +63,10 @@ void add_input_platform_options(

mi::PlatformPriority probe_input_platform(
mo::Option const& /*options*/,
mir::ConsoleServices& console)
mir::ConsoleServices& /*console*/)
{
mir::assert_entry_point_signature<mi::ProbePlatform>(&probe_input_platform);
if (can_open_input_devices(console))
return mi::PlatformPriority::supported;

return mi::PlatformPriority::unsupported;
return mi::PlatformPriority::supported;
}

mir::ModuleProperties const* describe_input_module()
Expand Down
17 changes: 7 additions & 10 deletions src/server/frontend_wayland/wl_keyboard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -110,14 +110,11 @@ void mf::WlKeyboard::send_key(std::shared_ptr<MirKeyboardEvent const> const& eve

void mf::WlKeyboard::send_modifiers(MirXkbModifiers const& modifiers)
{
if (focused_surface)
{
auto const serial = client->next_serial(nullptr);
send_modifiers_event(
serial,
modifiers.depressed,
modifiers.latched,
modifiers.locked,
modifiers.effective_layout);
}
auto const serial = client->next_serial(nullptr);
send_modifiers_event(
serial,
modifiers.depressed,
modifiers.latched,
modifiers.locked,
modifiers.effective_layout);
}
6 changes: 6 additions & 0 deletions src/server/shm_backing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,12 @@ class ShmBufferSIGBUSHandler
auto to_delete = previous_handler.exchange(old_handler);
delete to_delete;
}
else
{
// This is our handler; we don't need to save it, but we *do* need to
// delete the struct sigaction we've new'd above.
delete old_handler;
}
}

static void sigbus_handler(int sig, siginfo_t* info, void* ucontext)
Expand Down

0 comments on commit 2952a92

Please sign in to comment.