Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package miriway for openSUSE:Factory checked in at 2025-02-27 14:50:57 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/miriway (Old) and /work/SRC/openSUSE:Factory/.miriway.new.25152 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "miriway" Thu Feb 27 14:50:57 2025 rev:4 rq:1248816 version:25.02 Changes: -------- --- /work/SRC/openSUSE:Factory/miriway/miriway.changes 2025-02-22 19:06:28.490594630 +0100 +++ /work/SRC/openSUSE:Factory/.miriway.new.25152/miriway.changes 2025-02-27 14:54:00.564176263 +0100 @@ -1,0 +2,15 @@ +Thu Feb 27 00:33:31 UTC 2025 - Shawn Dunn <sfal...@opensuse.org> + +- Update version 25.02: + * Add an option to toggle always-on-top for the active window + (gh#Miriway/Miriway#144) + * Add MIRIWAY_DECORATIONS environment variable to customize the + decoration strategy (gh#Miriway/Miriway#150) + * Pick up the cursor theme from the usual places + (gh#Miriway/Miriway#154) + * It shouldn't be possible to dock/undock shell chrome or "always + on top" windows (gh#Miriway/Miriway#155) +- Drop: + * 0002-add-decoration-variable.patch + +------------------------------------------------------------------- Old: ---- 0002-add-decoration-variable.patch Miriway-24.11.1.tar.gz New: ---- Miriway-25.02.tar.gz BETA DEBUG BEGIN: Old:- Drop: * 0002-add-decoration-variable.patch BETA DEBUG END: ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ miriway.spec ++++++ --- /var/tmp/diff_new_pack.KzoZ14/_old 2025-02-27 14:54:01.300206974 +0100 +++ /var/tmp/diff_new_pack.KzoZ14/_new 2025-02-27 14:54:01.300206974 +0100 @@ -21,7 +21,7 @@ %define _name Miriway Name: miriway -Version: 24.11.1 +Version: 25.02 Release: 0 Summary: Simple Wayland compositor built on Mir License: GPL-3.0-only @@ -29,8 +29,6 @@ Source: https://github.com/%{_name}/%{_name}/archive/v%{version}/%{_name}-%{version}.tar.gz # PATCH-FIX-OPENSUSE 0001-Fix-xkbcommon-includes.patch Patch0: 0001-Fix-xkbcommon-includes.patch -# PATCH-FIX-UPSTREAM 0002-add-decoration-variable.patch sfal...@opensuse.org (gh#canonica/mir#3761) -Patch1: 0002-add-decoration-variable.patch BuildRequires: cmake BuildRequires: gcc-c++ BuildRequires: git-core ++++++ Miriway-24.11.1.tar.gz -> Miriway-25.02.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Miriway-24.11.1/example-configs/miriway-config-alan_g.bash new/Miriway-25.02/example-configs/miriway-config-alan_g.bash --- old/Miriway-24.11.1/example-configs/miriway-config-alan_g.bash 2024-12-02 18:52:11.000000000 +0100 +++ new/Miriway-25.02/example-configs/miriway-config-alan_g.bash 2025-02-26 13:43:33.000000000 +0100 @@ -88,6 +88,7 @@ ctrl-alt=d:cp ${miriway_display}~docked ${miriway_display} ctrl-alt=u:cp ${miriway_display}~undocked ${miriway_display} ctrl-alt=s:miriway-swap +ctrl-alt=Up:@toggle-always-on-top shell-ctrl-alt=y:systemd-run --user --scope --slice=background.slice yambar meta=Left:@dock-left diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Miriway-24.11.1/miriway-unsnap new/Miriway-25.02/miriway-unsnap --- old/Miriway-24.11.1/miriway-unsnap 2024-12-02 18:52:11.000000000 +0100 +++ new/Miriway-25.02/miriway-unsnap 2025-02-26 13:43:33.000000000 +0100 @@ -4,7 +4,9 @@ unset __EGL_VENDOR_LIBRARY_DIRS unset LIBGL_DRIVERS_PATH unset LIBINPUT_QUIRKS_DIR + unset DRIRC_CONFIGDIR + unset XDG_DESKTOP_PORTAL_DIR PATH="$(echo "$PATH" | sed "s#$SNAP[^:]*:##g")" fi -exec "$@" \ No newline at end of file +exec "$@" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Miriway-24.11.1/miriway.cpp new/Miriway-25.02/miriway.cpp --- old/Miriway-24.11.1/miriway.cpp 2024-12-02 18:52:11.000000000 +0100 +++ new/Miriway-25.02/miriway.cpp 2025-02-26 13:43:33.000000000 +0100 @@ -23,7 +23,9 @@ #include <mir/abnormal_exit.h> #include <mir/log.h> #include <miral/append_event_filter.h> +#include <miral/cursor_theme.h> #include <miral/configuration_option.h> +#include <miral/decorations.h> #include <miral/display_configuration_option.h> #include <miral/external_client.h> #include <miral/idle_listener.h> @@ -36,6 +38,7 @@ #include <miral/wayland_extensions.h> #include <miral/x11_support.h> +#include <cstring> #include <filesystem> #include <fstream> #include <functional> @@ -60,6 +63,7 @@ { "dock-left", [](ShellCommands* sc, bool shift) { sc->dock_active_window_left(shift); } }, { "dock-right", [](ShellCommands* sc, bool shift) { sc->dock_active_window_right(shift); } }, { "toggle-maximized", [](ShellCommands* sc, bool shift) { sc->toggle_maximized_restored(shift); } }, + { "toggle-always-on-top", [](ShellCommands* sc, bool shift) { sc->toggle_always_on_top(shift); } }, { "workspace-begin", [](ShellCommands* sc, bool shift) { sc->workspace_begin(shift); } }, { "workspace-end", [](ShellCommands* sc, bool shift) { sc->workspace_end(shift); } }, { "workspace-up", [](ShellCommands* sc, bool shift) { sc->workspace_up(shift); } }, @@ -203,6 +207,20 @@ return miriway_shell ? std::filesystem::path(miriway_shell) / basename : basename; } + +auto getenv_decorations() +{ + if (auto const strategy = getenv("MIRIWAY_DECORATIONS")) + { + if (strcmp(strategy, "always-ssd") == 0) return Decorations::always_ssd(); + if (strcmp(strategy, "prefer-ssd") == 0) return Decorations::prefer_ssd(); + if (strcmp(strategy, "always-csd") == 0) return Decorations::always_csd(); + if (strcmp(strategy, "prefer-csd") == 0) return Decorations::prefer_csd(); + + mir::log_warning("Unknown decoration strategy: '%s', using prefer-csd", strategy); + } + return Decorations::prefer_csd(); +} } int main(int argc, char const* argv[]) @@ -356,6 +374,8 @@ [&] { is_locked = true; }, [&] { is_locked = false; }), set_window_management_policy<WindowManagerPolicy>(commands), - lockscreen + lockscreen, + getenv_decorations(), + CursorTheme{"default"} }); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Miriway-24.11.1/miriway_commands.cpp new/Miriway-25.02/miriway_commands.cpp --- old/Miriway-24.11.1/miriway_commands.cpp 2024-12-02 18:52:11.000000000 +0100 +++ new/Miriway-25.02/miriway_commands.cpp 2025-02-26 13:43:33.000000000 +0100 @@ -135,6 +135,11 @@ wm->toggle_maximized_restored(); } +void miriway::ShellCommands::toggle_always_on_top(bool) const +{ + wm->toggle_always_on_top(); +} + void miriway::ShellCommands::workspace_begin(bool shift) const { wm->workspace_begin(shift); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Miriway-24.11.1/miriway_commands.h new/Miriway-25.02/miriway_commands.h --- old/Miriway-24.11.1/miriway_commands.h 2024-12-02 18:52:11.000000000 +0100 +++ new/Miriway-25.02/miriway_commands.h 2025-02-26 13:43:33.000000000 +0100 @@ -59,6 +59,7 @@ void dock_active_window_left(bool shift) const; void dock_active_window_right(bool shift) const; void toggle_maximized_restored(bool shift) const; + void toggle_always_on_top(bool shift) const; void workspace_begin(bool shift) const; void workspace_end(bool shift) const; void workspace_up(bool shift) const; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Miriway-24.11.1/miriway_policy.cpp new/Miriway-25.02/miriway_policy.cpp --- old/Miriway-24.11.1/miriway_policy.cpp 2024-12-02 18:52:11.000000000 +0100 +++ new/Miriway-25.02/miriway_policy.cpp 2025-02-26 13:43:33.000000000 +0100 @@ -82,7 +82,7 @@ { auto& window_info = tools.info_for(active_window); - if (!eligible_to_dock(window_info.type())) + if (!eligible_to_dock(window_info.type(), window_info.depth_layer())) { return; } @@ -109,6 +109,40 @@ }); } +void miriway::WindowManagerPolicy::toggle_always_on_top() +{ + tools.invoke_under_lock( + [this] + { + if (auto const w = tools.active_window()) + { + auto const& info = tools.info_for(w); + switch (info.depth_layer()) + { + case mir_depth_layer_application: + { + WindowSpecification modifications; + + tools.remove_tree_from_workspace(w, active_workspace()); + modifications.depth_layer() = mir_depth_layer_always_on_top; + tools.modify_window(tools.info_for(w), modifications); + return; + } + case mir_depth_layer_always_on_top: + { + WindowSpecification modifications; + + modifications.depth_layer() = mir_depth_layer_application; + tools.modify_window(tools.info_for(w), modifications); + tools.add_tree_to_workspace(w, active_workspace()); + return; + } + default:; + } + } + }); +} + void miriway::WindowManagerPolicy::dock_active_window_right() { tools.invoke_under_lock( @@ -209,7 +243,7 @@ auto const active_rect = tools.active_application_zone().extents(); auto& window_info = tools.info_for(active_window); - if (!eligible_to_dock(window_info.type())) + if (!eligible_to_dock(window_info.type(), window_info.depth_layer())) { return; } @@ -246,14 +280,14 @@ } } -bool miriway::WindowManagerPolicy::eligible_to_dock(MirWindowType window_type) +bool miriway::WindowManagerPolicy::eligible_to_dock(MirWindowType window_type, MirDepthLayer layer) { switch (window_type) { // Only normal (and freestyle) windows are eligible to dock. case mir_window_type_freestyle: case mir_window_type_normal: - return true; + return layer == mir_depth_layer_application; default: return false; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Miriway-24.11.1/miriway_policy.h new/Miriway-25.02/miriway_policy.h --- old/Miriway-24.11.1/miriway_policy.h 2024-12-02 18:52:11.000000000 +0100 +++ new/Miriway-25.02/miriway_policy.h 2025-02-26 13:43:33.000000000 +0100 @@ -44,6 +44,7 @@ bool handle_pointer_event(const MirPointerEvent* event) override; void handle_request_move(WindowInfo& window_info, const MirInputEvent* input_event) override; void toggle_maximized_restored(); + void toggle_always_on_top(); private: auto place_new_window(ApplicationInfo const& app_info, WindowSpecification const& request_parameters) @@ -56,7 +57,7 @@ bool handle_keyboard_event(MirKeyboardEvent const* event) override; void dock_active_window_under_lock(MirPlacementGravity placement); - static bool eligible_to_dock(MirWindowType window_type); + static bool eligible_to_dock(MirWindowType window_type, MirDepthLayer layer); ShellCommands* const commands; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Miriway-24.11.1/snap/snapcraft.yaml new/Miriway-25.02/snap/snapcraft.yaml --- old/Miriway-24.11.1/snap/snapcraft.yaml 2024-12-02 18:52:11.000000000 +0100 +++ new/Miriway-25.02/snap/snapcraft.yaml 2025-02-26 13:43:33.000000000 +0100 @@ -52,8 +52,7 @@ # environment variable is only intended to be used in their testing environment # but we are abusing it for our purposes here. XDG_DESKTOP_PORTAL_DIR: $SNAP/usr/share/xdg-desktop-portal/portals/ - # For "reasons" this is being set despite this being a classic snap. This overwrites the nonsense - LD_LIBRARY_PATH: "" + DRIRC_CONFIGDIR: ${SNAP}/usr/share/drirc.d session: command-chain: *command_chain @@ -107,6 +106,13 @@ - mir-graphics-drivers-nvidia - libfreetype6 - xdg-desktop-portal + # included in this part because they are used in the snap + - sway-notification-center + - swaybg + - swaylock + - synapse + - xwayland + - yambar prime: - -lib/udev - -usr/doc @@ -129,6 +135,8 @@ - -usr/include - -usr/lib/*/pkgconfig - -usr/lib/*/libmir*.so + # The libgallium* library needs no-patchelf, so it comes from the mesa-unpatched part + - -usr/lib/${CRAFT_ARCH_TRIPLET_BUILD_FOR}/libgallium* example-configs: plugin: dump @@ -148,24 +156,6 @@ plugin: dump source: systemd - mesa-patchelf: - build-attributes: - - enable-patchelf - plugin: nil - stage-packages: - - libgl1-mesa-dri - - libtinfo6 - # included in this part because they try to pull in mesa bits - - sway-notification-center - - swaybg - - swaylock - - synapse - - xwayland - - yambar - stage: - # The libraries in .../dri need no-patchelf, so they come from the mesa-unpatched part - - -usr/lib/${CRAFT_ARCH_TRIPLET_BUILD_FOR}/dri - mesa-no-patchelf: plugin: nil stage-packages: @@ -173,13 +163,14 @@ build-attributes: - no-patchelf # Otherwise snapcraft may strip the build ID and cause the driver to crash stage: - # Only the libraries in .../dri need to not be patched, the rest come from the mesa part - - usr/lib/${CRAFT_ARCH_TRIPLET_BUILD_FOR}/dri + - usr/lib/${CRAFT_ARCH_TRIPLET_BUILD_FOR}/libgallium* xdg-desktop-portal-wlr: plugin: meson source: https://github.com/emersion/xdg-desktop-portal-wlr.git source-tag: v0.5.0 + build-attributes: + - enable-patchelf build-packages: - meson - ninja-build @@ -190,3 +181,6 @@ - wayland-protocols stage-packages: - slurp + - libinih1 + - libwayland-cursor0 + - libcairo2