Hello community, here is the log from the commit of package waybar for openSUSE:Factory checked in at 2019-07-13 13:49:51 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/waybar (Old) and /work/SRC/openSUSE:Factory/.waybar.new.4615 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "waybar" Sat Jul 13 13:49:51 2019 rev:11 rq:714773 version:0.7.1 Changes: -------- --- /work/SRC/openSUSE:Factory/waybar/waybar.changes 2019-06-24 21:54:05.556139816 +0200 +++ /work/SRC/openSUSE:Factory/.waybar.new.4615/waybar.changes 2019-07-13 14:00:44.206891777 +0200 @@ -1,0 +2,10 @@ +Fri Jul 12 06:47:56 UTC 2019 - [email protected] + +- Update to 0.7.1: + Added: + * Added css class for window name and position #397 + Changed: + * Fixed workspaces scroll deadlock #403 + * Fixed pulseaudio scroll #405 + +------------------------------------------------------------------- Old: ---- 0.7.0.tar.gz New: ---- 0.7.1.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ waybar.spec ++++++ --- /var/tmp/diff_new_pack.2wIW9x/_old 2019-07-13 14:00:45.338891431 +0200 +++ /var/tmp/diff_new_pack.2wIW9x/_new 2019-07-13 14:00:45.358891424 +0200 @@ -17,7 +17,7 @@ Name: waybar -Version: 0.7.0 +Version: 0.7.1 Release: 0 Summary: Customizable Wayland bar for Sway and Wlroots based compositors License: MIT ++++++ 0.7.0.tar.gz -> 0.7.1.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Waybar-0.7.0/include/ALabel.hpp new/Waybar-0.7.1/include/ALabel.hpp --- old/Waybar-0.7.0/include/ALabel.hpp 2019-06-22 18:17:16.000000000 +0200 +++ new/Waybar-0.7.1/include/ALabel.hpp 2019-07-11 17:02:47.000000000 +0200 @@ -10,7 +10,7 @@ class ALabel : public AModule { public: ALabel(const Json::Value &, const std::string &, const std::string &, const std::string &format, - uint16_t interval = 0); + uint16_t interval = 0, bool ellipsize = false); virtual ~ALabel() = default; virtual auto update() -> void; virtual std::string getIcon(uint16_t, const std::string &alt = "", uint16_t max = 0); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Waybar-0.7.0/meson.build new/Waybar-0.7.1/meson.build --- old/Waybar-0.7.0/meson.build 2019-06-22 18:17:16.000000000 +0200 +++ new/Waybar-0.7.1/meson.build 2019-07-11 17:02:47.000000000 +0200 @@ -1,6 +1,6 @@ project( 'waybar', 'cpp', 'c', - version: '0.7.0', + version: '0.7.1', license: 'MIT', default_options : [ 'cpp_std=c++17', diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Waybar-0.7.0/resources/style.css new/Waybar-0.7.1/resources/style.css --- old/Waybar-0.7.0/resources/style.css 2019-06-22 18:17:16.000000000 +0200 +++ new/Waybar-0.7.1/resources/style.css 2019-07-11 17:02:47.000000000 +0200 @@ -36,7 +36,6 @@ border: none; } -/* https://github.com/Alexays/Waybar/wiki/FAQ#the-workspace-buttons-have-a-strange-hover-effect */ #workspaces button { padding: 0 5px; background-color: transparent; @@ -44,6 +43,13 @@ border-bottom: 3px solid transparent; } +/* https://github.com/Alexays/Waybar/wiki/FAQ#the-workspace-buttons-have-a-strange-hover-effect */ +#workspaces button:hover { + background: rgba(0, 0, 0, 0.2); + box-shadow: inherit; + border-bottom: 3px solid #ffffff; +} + #workspaces button.focused { background-color: #64727D; border-bottom: 3px solid #ffffff; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Waybar-0.7.0/src/ALabel.cpp new/Waybar-0.7.1/src/ALabel.cpp --- old/Waybar-0.7.0/src/ALabel.cpp 2019-06-22 18:17:16.000000000 +0200 +++ new/Waybar-0.7.1/src/ALabel.cpp 2019-07-11 17:02:47.000000000 +0200 @@ -5,7 +5,7 @@ namespace waybar { ALabel::ALabel(const Json::Value& config, const std::string& name, const std::string& id, - const std::string& format, uint16_t interval) + const std::string& format, uint16_t interval, bool ellipsize) : AModule(config, name, id, config["format-alt"].isString()), format_(config_["format"].isString() ? config_["format"].asString() : format), interval_(config_["interval"] == "once" @@ -21,6 +21,8 @@ if (config_["max-length"].isUInt()) { label_.set_max_width_chars(config_["max-length"].asUInt()); label_.set_ellipsize(Pango::EllipsizeMode::ELLIPSIZE_END); + } else if (ellipsize && label_.get_max_width_chars() == -1) { + label_.set_ellipsize(Pango::EllipsizeMode::ELLIPSIZE_END); } if (config_["rotate"].isUInt()) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Waybar-0.7.0/src/bar.cpp new/Waybar-0.7.1/src/bar.cpp --- old/Waybar-0.7.0/src/bar.cpp 2019-06-22 18:17:16.000000000 +0200 +++ new/Waybar-0.7.1/src/bar.cpp 2019-07-11 17:02:47.000000000 +0200 @@ -18,6 +18,8 @@ window.set_name("waybar"); window.set_decorated(false); window.get_style_context()->add_class(output->name); + window.get_style_context()->add_class(config["name"].asString()); + window.get_style_context()->add_class(config["position"].asString()); if (config["position"] == "right" || config["position"] == "left") { height_ = 0; @@ -302,9 +304,9 @@ auto waybar::Bar::setupWidgets() -> void { window.add(box_); - box_.pack_start(left_, true, true); + box_.pack_start(left_, false, false); box_.set_center_widget(center_); - box_.pack_end(right_, true, true); + box_.pack_end(right_, false, false); // Convert to button code for every module that is used. setupAltFormatKeyForModuleList("modules-left"); @@ -316,13 +318,13 @@ getModules(factory, "modules-center"); getModules(factory, "modules-right"); for (auto const& module : modules_left_) { - left_.pack_start(*module, false, true, 0); + left_.pack_start(*module, false, false); } for (auto const& module : modules_center_) { - center_.pack_start(*module, true, true, 0); + center_.pack_start(*module, false, false); } std::reverse(modules_right_.begin(), modules_right_.end()); for (auto const& module : modules_right_) { - right_.pack_end(*module, false, false, 0); + right_.pack_end(*module, false, false); } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Waybar-0.7.0/src/modules/network.cpp new/Waybar-0.7.1/src/modules/network.cpp --- old/Waybar-0.7.0/src/modules/network.cpp 2019-06-22 18:17:16.000000000 +0200 +++ new/Waybar-0.7.1/src/modules/network.cpp 2019-07-11 17:02:47.000000000 +0200 @@ -546,8 +546,7 @@ ifa = ifaddr; ifid = -1; while (ifa != nullptr) { - if (ifa->ifa_addr->sa_family == family_ && - wildcardMatch(config_["interface"].asString(), ifa->ifa_name)) { + if (wildcardMatch(config_["interface"].asString(), ifa->ifa_name)) { ifid = if_nametoindex(ifa->ifa_name); break; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Waybar-0.7.0/src/modules/pulseaudio.cpp new/Waybar-0.7.1/src/modules/pulseaudio.cpp --- old/Waybar-0.7.0/src/modules/pulseaudio.cpp 2019-06-22 18:17:16.000000000 +0200 +++ new/Waybar-0.7.1/src/modules/pulseaudio.cpp 2019-07-11 17:02:47.000000000 +0200 @@ -31,6 +31,8 @@ throw std::runtime_error("pa_mainloop_run() failed."); } pa_threaded_mainloop_unlock(mainloop_); + event_box_.add_events(Gdk::SCROLL_MASK | Gdk::SMOOTH_SCROLL_MASK); + event_box_.signal_scroll_event().connect(sigc::mem_fun(*this, &Pulseaudio::handleScroll)); } waybar::modules::Pulseaudio::~Pulseaudio() { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Waybar-0.7.0/src/modules/sway/mode.cpp new/Waybar-0.7.1/src/modules/sway/mode.cpp --- old/Waybar-0.7.0/src/modules/sway/mode.cpp 2019-06-22 18:17:16.000000000 +0200 +++ new/Waybar-0.7.1/src/modules/sway/mode.cpp 2019-07-11 17:02:47.000000000 +0200 @@ -3,7 +3,8 @@ namespace waybar::modules::sway { -Mode::Mode(const std::string& id, const Json::Value& config) : ALabel(config, "mode", id, "{}") { +Mode::Mode(const std::string& id, const Json::Value& config) + : ALabel(config, "mode", id, "{}", 0, true) { ipc_.subscribe(R"(["mode"])"); ipc_.signal_event.connect(sigc::mem_fun(*this, &Mode::onEvent)); // Launch worker @@ -14,7 +15,7 @@ void Mode::onEvent(const struct Ipc::ipc_response& res) { try { std::lock_guard<std::mutex> lock(mutex_); - auto payload = parser_.parse(res.payload); + auto payload = parser_.parse(res.payload); if (payload["change"] != "default") { mode_ = Glib::Markup::escape_text(payload["change"].asString()); } else { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Waybar-0.7.0/src/modules/sway/window.cpp new/Waybar-0.7.1/src/modules/sway/window.cpp --- old/Waybar-0.7.0/src/modules/sway/window.cpp 2019-06-22 18:17:16.000000000 +0200 +++ new/Waybar-0.7.1/src/modules/sway/window.cpp 2019-07-11 17:02:47.000000000 +0200 @@ -4,10 +4,7 @@ namespace waybar::modules::sway { Window::Window(const std::string& id, const Bar& bar, const Json::Value& config) - : ALabel(config, "window", id, "{}"), bar_(bar), windowId_(-1) { - if (label_.get_max_width_chars() == -1) { - label_.set_ellipsize(Pango::EllipsizeMode::ELLIPSIZE_END); - } + : ALabel(config, "window", id, "{}", 0, true), bar_(bar), windowId_(-1) { ipc_.subscribe(R"(["window","workspace"])"); ipc_.signal_event.connect(sigc::mem_fun(*this, &Window::onEvent)); ipc_.signal_cmd.connect(sigc::mem_fun(*this, &Window::onCmd)); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Waybar-0.7.0/src/modules/sway/workspaces.cpp new/Waybar-0.7.1/src/modules/sway/workspaces.cpp --- old/Waybar-0.7.0/src/modules/sway/workspaces.cpp 2019-06-22 18:17:16.000000000 +0200 +++ new/Waybar-0.7.1/src/modules/sway/workspaces.cpp 2019-07-11 17:02:47.000000000 +0200 @@ -218,23 +218,25 @@ if (dir == SCROLL_DIR::NONE) { return true; } - std::lock_guard<std::mutex> lock(mutex_); - auto it = std::find_if(workspaces_.begin(), workspaces_.end(), [](const auto &workspace) { - return workspace["focused"].asBool(); - }); - if (it == workspaces_.end()) { - return true; - } std::string name; - if (dir == SCROLL_DIR::DOWN || dir == SCROLL_DIR::RIGHT) { - name = getCycleWorkspace(it, false); - } else if (dir == SCROLL_DIR::UP || dir == SCROLL_DIR::LEFT) { - name = getCycleWorkspace(it, true); - } else { - return true; - } - if (name == (*it)["name"].asString()) { - return true; + { + std::lock_guard<std::mutex> lock(mutex_); + auto it = std::find_if(workspaces_.begin(), workspaces_.end(), [](const auto &workspace) { + return workspace["focused"].asBool(); + }); + if (it == workspaces_.end()) { + return true; + } + if (dir == SCROLL_DIR::DOWN || dir == SCROLL_DIR::RIGHT) { + name = getCycleWorkspace(it, false); + } else if (dir == SCROLL_DIR::UP || dir == SCROLL_DIR::LEFT) { + name = getCycleWorkspace(it, true); + } else { + return true; + } + if (name == (*it)["name"].asString()) { + return true; + } } try { ipc_.sendCmd(IPC_COMMAND, fmt::format("workspace \"{}\"", name));
