Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 2.18.0 #3532

Merged
merged 11 commits into from
Sep 17, 2024
55 changes: 55 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,58 @@
mir (2.18.0) UNRELEASED; urgency=medium

* New upstream release 2.18.0

- ABI summary:
. miral ABI unchanged at 7
. mircommon ABI bumped to 10
. mircore ABI unchanged at 2
. miroil ABI unchanged at 5
. mirplatform ABI bumped to 29
. mirserver ABI unchanged at 60
. mirwayland ABI unchanged at 5
. mirplatformgraphics ABI unchanged at 22
. mirinputplatform ABI unchanged at 9

Enhancements:
. Move to 24.04 as the development focus (#3374)
. Implement a more principled `GraphicBufferAllocator` selector (#3402)
. Add input configuration options (#3415)
. Provide a listener for dim/screen off notifications and wiring it through miral (#3405)
. Resolve snap desktop files using app armor as the primary source (#3426)
. Wayland server side decorations (#3425)
. Add Wayland decorations strategy (#3454)
. `wp_viewporter` support (#3445)
. Enable keyboard LEDs when the modifier state changes (#3441)
. x11-kiosk (#3460)
. ci: replace codecov with TICS (#3485)
. ci: enable AddressSanitizer (#3026)
. Add support for `wp_fractional_scale_v1` (#3509)
. Allow servers to dynamically update input configuration

Documentation:
. Add Mir's CI documentation (#3434)
. Explanation of how libraries depend on one another (#3469)
. Draft a new Mir tutorial (#3496)
. Add a threat model diagram for Ubuntu Frame (#3484)

Bugs fixed:
. Alt key sometimes getting stuck after Alt+Tab (#3307)
. Alt+` is confusing Firefox (#3379)
. Fix cross-GPU imports (#3401)
. Alt+Tab restores minimized windows, even if they don't end up focused (#3323)
. Don't re-send wl_output.geometry if unchanged (#3414)
. Abrupt cursor transition between outputs. (#3449)
(thanks @ehopperdietzel!)
. mir_kiosk_x11 crashes when the host platform has no outputs (#3427)
. Screenshots no longer respect output scale (#3461)
. Mir should respect flags from DEB_BUILD_MAINT_OPTIONS (LP#2073451)
. Fix x11 rendering when scaled fractional scaling (#3508, #3554)
. wbg constantly resizing after switching to 2.17.0 (#3450)
. Decorations Eat Into Application Area (#3572)
. Fix toplevel window resize pingpong. (Fixes #3573)

-- Michał Sawicz <[email protected]> Thu, 08 Aug 2024 10:35:09 +0200

mir (2.17.0) UNRELEASED; urgency=medium

[ Matthew Kosarek ]
Expand Down
43 changes: 43 additions & 0 deletions debian/libmiral7.symbols
Original file line number Diff line number Diff line change
Expand Up @@ -447,4 +447,47 @@ libmiral.so.7 libmiral7 #MINVER#
(c++)"miral::IdleListener::on_off(std::function<void ()> const&)@MIRAL_5.1" 5.1.0
(c++)"miral::IdleListener::on_wake(std::function<void ()> const&)@MIRAL_5.1" 5.1.0
(c++)"miral::IdleListener::operator()(mir::Server&) const@MIRAL_5.1" 5.1.0
(c++)"miral::InputConfiguration::InputConfiguration()@MIRAL_5.1" 5.1.0
(c++)"miral::InputConfiguration::Mouse::Mouse()@MIRAL_5.1" 5.1.0
(c++)"miral::InputConfiguration::Mouse::Mouse(miral::InputConfiguration::Mouse const&)@MIRAL_5.1" 5.1.0
(c++)"miral::InputConfiguration::Mouse::acceleration() const@MIRAL_5.1" 5.1.0
(c++)"miral::InputConfiguration::Mouse::acceleration(std::optional<MirPointerAcceleration> const&)@MIRAL_5.1" 5.1.0
(c++)"miral::InputConfiguration::Mouse::acceleration_bias() const@MIRAL_5.1" 5.1.0
(c++)"miral::InputConfiguration::Mouse::acceleration_bias(std::optional<double> const&)@MIRAL_5.1" 5.1.0
(c++)"miral::InputConfiguration::Mouse::handedness() const@MIRAL_5.1" 5.1.0
(c++)"miral::InputConfiguration::Mouse::handedness(std::optional<MirPointerHandedness> const&)@MIRAL_5.1" 5.1.0
(c++)"miral::InputConfiguration::Mouse::hscroll_speed() const@MIRAL_5.1" 5.1.0
(c++)"miral::InputConfiguration::Mouse::hscroll_speed(std::optional<double> const&)@MIRAL_5.1" 5.1.0
(c++)"miral::InputConfiguration::Mouse::operator=(miral::InputConfiguration::Mouse)@MIRAL_5.1" 5.1.0
(c++)"miral::InputConfiguration::Mouse::vscroll_speed() const@MIRAL_5.1" 5.1.0
(c++)"miral::InputConfiguration::Mouse::vscroll_speed(std::optional<double> const&)@MIRAL_5.1" 5.1.0
(c++)"miral::InputConfiguration::Mouse::~Mouse()@MIRAL_5.1" 5.1.0
(c++)"miral::InputConfiguration::Touchpad::Touchpad()@MIRAL_5.1" 5.1.0
(c++)"miral::InputConfiguration::Touchpad::Touchpad(miral::InputConfiguration::Touchpad const&)@MIRAL_5.1" 5.1.0
(c++)"miral::InputConfiguration::Touchpad::acceleration() const@MIRAL_5.1" 5.1.0
(c++)"miral::InputConfiguration::Touchpad::acceleration(std::optional<MirPointerAcceleration> const&)@MIRAL_5.1" 5.1.0
(c++)"miral::InputConfiguration::Touchpad::acceleration_bias() const@MIRAL_5.1" 5.1.0
(c++)"miral::InputConfiguration::Touchpad::acceleration_bias(std::optional<double> const&)@MIRAL_5.1" 5.1.0
(c++)"miral::InputConfiguration::Touchpad::click_mode() const@MIRAL_5.1" 5.1.0
(c++)"miral::InputConfiguration::Touchpad::click_mode(std::optional<MirTouchpadClickMode> const&)@MIRAL_5.1" 5.1.0
(c++)"miral::InputConfiguration::Touchpad::disable_while_typing() const@MIRAL_5.1" 5.1.0
(c++)"miral::InputConfiguration::Touchpad::disable_while_typing(std::optional<bool> const&)@MIRAL_5.1" 5.1.0
(c++)"miral::InputConfiguration::Touchpad::disable_with_external_mouse() const@MIRAL_5.1" 5.1.0
(c++)"miral::InputConfiguration::Touchpad::disable_with_external_mouse(std::optional<bool> const&)@MIRAL_5.1" 5.1.0
(c++)"miral::InputConfiguration::Touchpad::hscroll_speed() const@MIRAL_5.1" 5.1.0
(c++)"miral::InputConfiguration::Touchpad::hscroll_speed(std::optional<double> const&)@MIRAL_5.1" 5.1.0
(c++)"miral::InputConfiguration::Touchpad::operator=(miral::InputConfiguration::Touchpad)@MIRAL_5.1" 5.1.0
(c++)"miral::InputConfiguration::Touchpad::scroll_mode() const@MIRAL_5.1" 5.1.0
(c++)"miral::InputConfiguration::Touchpad::scroll_mode(std::optional<MirTouchpadScrollMode> const&)@MIRAL_5.1" 5.1.0
(c++)"miral::InputConfiguration::Touchpad::tap_to_click() const@MIRAL_5.1" 5.1.0
(c++)"miral::InputConfiguration::Touchpad::tap_to_click(std::optional<bool> const&)@MIRAL_5.1" 5.1.0
(c++)"miral::InputConfiguration::Touchpad::vscroll_speed() const@MIRAL_5.1" 5.1.0
(c++)"miral::InputConfiguration::Touchpad::vscroll_speed(std::optional<double> const&)@MIRAL_5.1" 5.1.0
(c++)"miral::InputConfiguration::Touchpad::~Touchpad()@MIRAL_5.1" 5.1.0
(c++)"miral::InputConfiguration::mouse()@MIRAL_5.1" 5.1.0
(c++)"miral::InputConfiguration::mouse(miral::InputConfiguration::Mouse const&)@MIRAL_5.1" 5.1.0
(c++)"miral::InputConfiguration::operator()(mir::Server&)@MIRAL_5.1" 5.1.0
(c++)"miral::InputConfiguration::touchpad()@MIRAL_5.1" 5.1.0
(c++)"miral::InputConfiguration::touchpad(miral::InputConfiguration::Touchpad const&)@MIRAL_5.1" 5.1.0
(c++)"miral::InputConfiguration::~InputConfiguration()@MIRAL_5.1" 5.1.0
(c++)"miral::WindowManagerTools::move_cursor_to(mir::geometry::generic::Point<float>)@MIRAL_5.1" 5.1.0
3 changes: 2 additions & 1 deletion debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,10 @@ ifeq ($(filter Ubuntu,$(DEB_VENDOR)),)
COMMON_CONFIGURE_OPTIONS += -DMIR_RUN_WLCS_TESTS=OFF
endif

# Disable miral tests on Launchpad riscv64 (canonical/mir#3443)
# Disable tests on Launchpad riscv64 (canonical/mir#3443, canonical/mir#3470)
ifeq ($(USER) $(DEB_HOST_ARCH),buildd riscv64)
COMMON_CONFIGURE_OPTIONS += -DMIR_RUN_MIRAL_TESTS=OFF
COMMON_CONFIGURE_OPTIONS += -DMIR_RUN_WINDOW_MANAGEMENT_TESTS=OFF
endif

# Disable pre-compiled headers on GCC>=12
Expand Down
42 changes: 39 additions & 3 deletions examples/mir_demo_server/server_example.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,22 +20,25 @@

#include <miral/cursor_theme.h>
#include <miral/display_configuration_option.h>
#include <miral/input_configuration.h>
#include <miral/minimal_window_manager.h>
#include <miral/config_file.h>
#include <miral/runner.h>
#include <miral/set_window_management_policy.h>
#include <miral/wayland_extensions.h>
#include <miral/x11_support.h>

#include "mir/abnormal_exit.h"
#include "mir/server.h"
#include "mir/main_loop.h"
#include "mir/report_exception.h"
#include "mir/options/option.h"
#include "mir/report_exception.h"
#include "mir/server.h"

#include <boost/exception/diagnostic_information.hpp>

#include <chrono>
#include <cstdlib>
#include <iostream>

namespace mir { class AbnormalExit; }

Expand Down Expand Up @@ -116,6 +119,38 @@ try
{
miral::MirRunner runner{argc, argv, "mir/mir_demo_server.config"};

miral::InputConfiguration input_configuration;

miral::ConfigFile test{runner, "mir_demo_server.input", miral::ConfigFile::Mode::reload_on_change,
[&input_configuration](auto& in, auto path)
{
std::cout << "** Reloading: " << path << std::endl;

auto mouse = input_configuration.mouse();
auto touchpad = input_configuration.touchpad();

for (std::string line; std::getline(in, line);)
{
std::cout << line << std::endl;

if (line == "mir_pointer_handedness_right")
mouse.handedness(mir_pointer_handedness_right);
if (line == "mir_pointer_handedness_left")
mouse.handedness(mir_pointer_handedness_left);

if (line == "mir_touchpad_scroll_mode_none")
touchpad.scroll_mode(mir_touchpad_scroll_mode_none);
if (line == "mir_touchpad_scroll_mode_two_finger_scroll")
touchpad.scroll_mode(mir_touchpad_scroll_mode_two_finger_scroll);
if (line == "mir_touchpad_scroll_mode_edge_scroll")
touchpad.scroll_mode(mir_touchpad_scroll_mode_edge_scroll);
if (line == "mir_touchpad_scroll_mode_button_down_scroll")
touchpad.scroll_mode(mir_touchpad_scroll_mode_button_down_scroll);
}
input_configuration.mouse(mouse);
input_configuration.touchpad(touchpad);
}};

runner.set_exception_handler(exception_handler);

std::function<void()> shutdown_hook{[]{}};
Expand All @@ -138,7 +173,8 @@ try
add_timeout_option_to,
miral::CursorTheme{"default:DMZ-White"},
input_filters,
test_runner
test_runner,
input_configuration,
});

// Propagate any test failure
Expand Down
125 changes: 125 additions & 0 deletions include/miral/miral/input_configuration.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
/*
* 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 <http://www.gnu.org/licenses/>.
*/

#ifndef MIRAL_INPUT_CONFIGURATION_H
#define MIRAL_INPUT_CONFIGURATION_H

#include <mir_toolkit/mir_input_device_types.h>

#include <optional>
#include <memory>

namespace mir { class Server; }


namespace miral
{
/** Input configuration.
* Allow servers to make input configuration changes at runtime
* \remark Since MirAL 5.1
*/
class InputConfiguration
{
public:
InputConfiguration();
~InputConfiguration();
void operator()(mir::Server& server);

class Mouse;
class Touchpad;

auto mouse() -> Mouse;
void mouse(Mouse const& val);
auto touchpad() -> Touchpad;
void touchpad(Touchpad const& val);

private:
class Self;
std::shared_ptr<Self> self;
};

/** Input configuration for mouse pointer devices
* \remark Since MirAL 5.1
*/
class InputConfiguration::Mouse
{
public:
Mouse();
~Mouse();

Mouse(Mouse const& that);
auto operator=(Mouse that) -> Mouse&;

auto handedness() const -> std::optional<MirPointerHandedness>;
auto acceleration() const -> std::optional<MirPointerAcceleration>;
auto acceleration_bias() const -> std::optional<double>;
auto vscroll_speed() const -> std::optional<double>;
auto hscroll_speed() const -> std::optional<double>;

void handedness(std::optional<MirPointerHandedness>const& val);
void acceleration(std::optional<MirPointerAcceleration>const& val);
/// \note val will be clamped to the range [-1.0, 1.0]
void acceleration_bias(std::optional<double>const& val);
void vscroll_speed(std::optional<double>const& val);
void hscroll_speed(std::optional<double>const& val);

private:
friend class InputConfiguration::Self;
class Self;
std::unique_ptr<Self> self;
};

/** Input configuration for touchpad devices
* \remark Since MirAL 5.1
*/
class InputConfiguration::Touchpad
{
public:
Touchpad();
~Touchpad();

Touchpad(Touchpad const& that);
auto operator=(Touchpad that) -> Touchpad&;

auto disable_while_typing() const -> std::optional<bool>;
auto disable_with_external_mouse() const -> std::optional<bool>;
auto acceleration() const -> std::optional<MirPointerAcceleration>;
auto acceleration_bias() const -> std::optional<double>;
auto vscroll_speed() const -> std::optional<double>;
auto hscroll_speed() const -> std::optional<double>;
auto click_mode() const -> std::optional<MirTouchpadClickMode>;
auto scroll_mode() const -> std::optional<MirTouchpadScrollMode>;
auto tap_to_click() const -> std::optional<bool>;

void disable_while_typing(std::optional<bool>const& val);
void disable_with_external_mouse(std::optional<bool>const& val);
void acceleration(std::optional<MirPointerAcceleration>const& val);
/// \note val will be clamped to the range [-1.0, 1.0]
void acceleration_bias(std::optional<double>const& val);
void vscroll_speed(std::optional<double>const& val);
void hscroll_speed(std::optional<double>const& val);
void click_mode(std::optional<MirTouchpadClickMode>const& val);
void scroll_mode(std::optional<MirTouchpadScrollMode>const& val);
void tap_to_click(std::optional<bool>const& val);

private:
friend class InputConfiguration::Self;
class Self;
std::shared_ptr<Self> self;
};
}

#endif //MIRAL_INPUT_CONFIGURATION_H
1 change: 1 addition & 0 deletions src/include/server/mir/scene/null_surface_observer.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ class NullSurfaceObserver : public SurfaceObserver
void application_id_set_to(Surface const* surf, std::string const& application_id) override;
void entered_output(Surface const* surf, graphics::DisplayConfigurationOutputId const& id) override;
void left_output(Surface const* surf, graphics::DisplayConfigurationOutputId const& id) override;
void rescale_output(Surface const* surf, graphics::DisplayConfigurationOutputId const& id) override;

protected:
NullSurfaceObserver(NullSurfaceObserver const&) = delete;
Expand Down
1 change: 1 addition & 0 deletions src/include/server/mir/scene/surface_observer.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ class SurfaceObserver
virtual void depth_layer_set_to(Surface const* surf, MirDepthLayer depth_layer) = 0;
virtual void entered_output(Surface const* surf, graphics::DisplayConfigurationOutputId const& id) = 0;
virtual void left_output(Surface const* surf, graphics::DisplayConfigurationOutputId const& id) = 0;
virtual void rescale_output(Surface const* surf, graphics::DisplayConfigurationOutputId const& id) = 0;

protected:
SurfaceObserver() = default;
Expand Down
3 changes: 2 additions & 1 deletion src/miral/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ add_library(miral-internal STATIC
system_compositor_window_manager.cpp system_compositor_window_manager.h
display_configuration_listeners.cpp display_configuration_listeners.h
fd_manager.cpp fd_manager.h
input_device_config.cpp input_device_config.h
input_device_config.cpp input_device_configuration_options.h input_device_config.h
launch_app.cpp launch_app.h
mru_window_list.cpp mru_window_list.h
open_desktop_entry.cpp open_desktop_entry.h
Expand Down Expand Up @@ -63,6 +63,7 @@ add_library(miral-external OBJECT
display_configuration.cpp ${miral_include}/miral/display_configuration.h
external_client.cpp ${miral_include}/miral/external_client.h
idle_listener.cpp ${miral_include}/miral/idle_listener.h
input_configuration.cpp ${miral_include}/miral/input_configuration.h
keymap.cpp ${miral_include}/miral/keymap.h
minimal_window_manager.cpp ${miral_include}/miral/minimal_window_manager.h
display_configuration_option.cpp ${miral_include}/miral/display_configuration_option.h
Expand Down
Loading
Loading