Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package polybar for openSUSE:Factory checked in at 2022-05-04 15:11:14 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/polybar (Old) and /work/SRC/openSUSE:Factory/.polybar.new.1538 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "polybar" Wed May 4 15:11:14 2022 rev:10 rq:974879 version:3.6.3 Changes: -------- --- /work/SRC/openSUSE:Factory/polybar/polybar.changes 2022-05-02 16:25:49.484855232 +0200 +++ /work/SRC/openSUSE:Factory/.polybar.new.1538/polybar.changes 2022-05-04 15:11:35.928205091 +0200 @@ -1,0 +2,12 @@ +Wed May 4 09:27:41 UTC 2022 - Mateusz Mielczarek <mateusz.mielczar...@gmail.com> + +- Update to 3.6.3: + * custom/script: Output clearing when exec-if fails (#2674) + * internal/battery: poll-interval not working (#2649, #2677) + * ipc: Polybar failing to open IPC channel after another user already ran polybar, if XDG_RUNTIME_DIR is not set (#2683, #2684) + * No overlines/underlines being drawn when using offsets (#2685) + * Update struts (_NET_WM_STRUT_PARTIAL) when hiding the bar (#2702) + * internal/pulseaudio: Hanging during startup (#2707, #2709) + * internal/xworkspaces: Updates of _NET_DESKTOP_VIEWPORT being ignored (#2693, #2698) + +------------------------------------------------------------------- Old: ---- polybar-3.6.2.tar.gz New: ---- polybar-3.6.3.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ polybar.spec ++++++ --- /var/tmp/diff_new_pack.y6NiaW/_old 2022-05-04 15:11:36.448205731 +0200 +++ /var/tmp/diff_new_pack.y6NiaW/_new 2022-05-04 15:11:36.452205736 +0200 @@ -17,7 +17,7 @@ Name: polybar -Version: 3.6.2 +Version: 3.6.3 Release: 0 Summary: A fast and easy-to-use status bar License: MIT ++++++ polybar-3.6.2.tar.gz -> polybar-3.6.3.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/polybar-3.6.2/CHANGELOG.md new/polybar-3.6.3/CHANGELOG.md --- old/polybar-3.6.2/CHANGELOG.md 2022-04-03 19:55:39.000000000 +0200 +++ new/polybar-3.6.3/CHANGELOG.md 2022-05-04 11:05:48.000000000 +0200 @@ -10,6 +10,16 @@ ## [Unreleased] +## [3.6.3] - 2022-05-04 +### Fixed +- `custom/script`: Output clearing when `exec-if` fails ([`#2674`](https://github.com/polybar/polybar/issues/2674)) +- `internal/battery`: `poll-interval` not working ([`#2649`](https://github.com/polybar/polybar/issues/2649), [`#2677`](https://github.com/polybar/polybar/pull/2677)) +- ipc: Polybar failing to open IPC channel after another user already ran polybar, if `XDG_RUNTIME_DIR` is not set ([`#2683`](https://github.com/polybar/polybar/issues/2683), [`#2684`](https://github.com/polybar/polybar/pull/2684)) +- No overlines/underlines being drawn when using offsets ([`#2685`](https://github.com/polybar/polybar/pull/2685)) +- Update struts (`_NET_WM_STRUT_PARTIAL`) when hiding the bar ([`#2702`](https://github.com/polybar/polybar/pull/2702)) +- `internal/pulseaudio`: Hanging during startup ([`#2707`](https://github.com/polybar/polybar/issues/2707), [`#2709`](https://github.com/polybar/polybar/pull/2709)) +- `internal/xworkspaces`: Updates of `_NET_DESKTOP_VIEWPORT` being ignored ([`#2693`](https://github.com/polybar/polybar/issues/2693), [`#2698`](https://github.com/polybar/polybar/pull/2698)) + ## [3.6.2] - 2022-04-03 ### Fixed - `format-offset` being ignored ([`#2643`](https://github.com/polybar/polybar/pull/2643)) @@ -172,7 +182,8 @@ ### Fixed - Empty color values are no longer treated as invalid and no longer produce an error. -[Unreleased]: https://github.com/polybar/polybar/compare/3.6.2...HEAD +[Unreleased]: https://github.com/polybar/polybar/compare/3.6.3...HEAD +[3.6.3]: https://github.com/polybar/polybar/releases/tag/3.6.3 [3.6.2]: https://github.com/polybar/polybar/releases/tag/3.6.2 [3.6.1]: https://github.com/polybar/polybar/releases/tag/3.6.1 [3.6.0]: https://github.com/polybar/polybar/releases/tag/3.6.0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/polybar-3.6.2/doc/user/actions.rst new/polybar-3.6.3/doc/user/actions.rst --- old/polybar-3.6.2/doc/user/actions.rst 2022-04-03 19:55:39.000000000 +0200 +++ new/polybar-3.6.3/doc/user/actions.rst 2022-05-04 11:05:48.000000000 +0200 @@ -406,20 +406,22 @@ [module/apps] type = custom/menu + label-open = Apps + menu-0-0 = Browsers menu-0-0-exec = menu-open-1 menu-0-1 = Multimedia menu-0-1-exec = menu-open-2 menu-1-0 = Firefox - menu-1-0-exec = firefox & + menu-1-0-exec = firefox menu-1-1 = Chromium - menu-1-1-exec = chromium & + menu-1-1-exec = chromium menu-2-0 = Gimp - menu-2-0-exec = gimp & + menu-2-0-exec = gimp menu-2-1 = Scrot - menu-2-1-exec = scrot & + menu-2-1-exec = scrot This module uses two actions: ``menu-open-1`` and ``menu-open-2``. These are actions with data, the data specifies which level of the menu should @@ -437,17 +439,19 @@ [module/apps] type = custom/menu + label-open = Apps + menu-0-0 = Browsers menu-0-0-exec = #apps.open.1 menu-0-1 = Multimedia menu-0-1-exec = #apps.open.2 menu-1-0 = Firefox - menu-1-0-exec = firefox & + menu-1-0-exec = firefox menu-1-1 = Chromium - menu-1-1-exec = chromium & + menu-1-1-exec = chromium menu-2-0 = Gimp - menu-2-0-exec = gimp & + menu-2-0-exec = gimp menu-2-1 = Scrot - menu-2-1-exec = scrot & + menu-2-1-exec = scrot diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/polybar-3.6.2/include/adapters/pulseaudio.hpp new/polybar-3.6.3/include/adapters/pulseaudio.hpp --- old/polybar-3.6.2/include/adapters/pulseaudio.hpp 2022-04-03 19:55:39.000000000 +0200 +++ new/polybar-3.6.3/include/adapters/pulseaudio.hpp 2022-05-04 11:05:48.000000000 +0200 @@ -2,6 +2,7 @@ #include <pulse/pulseaudio.h> +#include <atomic> #include <queue> #include "common.hpp" @@ -58,6 +59,11 @@ const logger& m_log; + /** + * Has context_state_callback signalled the mainloop during connection. + */ + std::atomic_bool m_state_callback_signal{false}; + // used for temporary callback results int success{0}; pa_cvolume cv{}; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/polybar-3.6.2/include/components/renderer.hpp new/polybar-3.6.3/include/components/renderer.hpp --- old/polybar-3.6.2/include/components/renderer.hpp 2022-04-03 19:55:39.000000000 +0200 +++ new/polybar-3.6.3/include/components/renderer.hpp 2022-05-04 11:05:48.000000000 +0200 @@ -72,7 +72,7 @@ void fill_overline(rgba color, double x, double w); void fill_underline(rgba color, double x, double w); void fill_borders(); - void draw_offset(rgba color, double x, double w); + void draw_offset(const tags::context& ctxt, rgba color, double x, double w); double block_x(alignment a) const; double block_y(alignment a) const; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/polybar-3.6.2/include/ipc/ipc.hpp new/polybar-3.6.3/include/ipc/ipc.hpp --- old/polybar-3.6.2/include/ipc/ipc.hpp 2022-04-03 19:55:39.000000000 +0200 +++ new/polybar-3.6.3/include/ipc/ipc.hpp 2022-05-04 11:05:48.000000000 +0200 @@ -1,7 +1,5 @@ #pragma once -#include <uv.h> - #include <set> #include "common.hpp" @@ -94,6 +92,6 @@ void receive_data(string buf); void receive_eof(); }; -} // namespace ipc +} // namespace ipc POLYBAR_NS_END diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/polybar-3.6.2/src/adapters/pulseaudio.cpp new/polybar-3.6.3/src/adapters/pulseaudio.cpp --- old/polybar-3.6.2/src/adapters/pulseaudio.cpp 2022-04-03 19:55:39.000000000 +0200 +++ new/polybar-3.6.3/src/adapters/pulseaudio.cpp 2022-05-04 11:05:48.000000000 +0200 @@ -24,6 +24,8 @@ pa_context_set_state_callback(m_context, context_state_callback, this); + m_state_callback_signal = false; + if (pa_context_connect(m_context, nullptr, PA_CONTEXT_NOFLAGS, nullptr) < 0) { pa_context_disconnect(m_context); pa_context_unref(m_context); @@ -42,7 +44,17 @@ m_log.trace("pulseaudio: started mainloop"); - pa_threaded_mainloop_wait(m_mainloop); + /* + * Only wait for signal from the context state callback, if it has not + * already signalled the mainloop since pa_context_connect was called, + * otherwise, we would wait forever. + * + * The while loop ensures spurious wakeups are handled. + */ + while (!m_state_callback_signal) { + pa_threaded_mainloop_wait(m_mainloop); + } + if (pa_context_get_state(m_context) != PA_CONTEXT_READY) { pa_threaded_mainloop_unlock(m_mainloop); pa_threaded_mainloop_stop(m_mainloop); @@ -310,6 +322,7 @@ case PA_CONTEXT_READY: case PA_CONTEXT_TERMINATED: case PA_CONTEXT_FAILED: + This->m_state_callback_signal = true; pa_threaded_mainloop_signal(This->m_mainloop, 0); break; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/polybar-3.6.2/src/adapters/script_runner.cpp new/polybar-3.6.3/src/adapters/script_runner.cpp --- old/polybar-3.6.2/src/adapters/script_runner.cpp 2022-04-03 19:55:39.000000000 +0200 +++ new/polybar-3.6.3/src/adapters/script_runner.cpp 2022-05-04 11:05:48.000000000 +0200 @@ -45,7 +45,10 @@ } void script_runner::clear_output() { - set_output(""); + auto changed = set_output(""); + if (changed) { + m_on_update(m_data); + } } void script_runner::stop() { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/polybar-3.6.2/src/components/bar.cpp new/polybar-3.6.3/src/components/bar.cpp --- old/polybar-3.6.2/src/components/bar.cpp 2022-04-03 19:55:39.000000000 +0200 +++ new/polybar-3.6.3/src/components/bar.cpp 2022-05-04 11:05:48.000000000 +0200 @@ -440,10 +440,11 @@ try { m_log.info("Hiding bar window"); + m_visible = false; + reconfigure_struts(); m_sig.emit(visibility_change{false}); m_connection.unmap_window_checked(m_opts.window); m_connection.flush(); - m_visible = false; } catch (const exception& err) { m_log.err("Failed to unmap bar window (err=%s", err.what()); } @@ -556,42 +557,46 @@ * Reconfigure window strut values */ void bar::reconfigure_struts() { - auto geom = m_connection.get_geometry(m_screen->root()); - int h = m_opts.size.h + m_opts.offset.y; + window win{m_connection, m_opts.window}; + if (m_visible) { + auto geom = m_connection.get_geometry(m_screen->root()); + int h = m_opts.size.h + m_opts.offset.y; - // Apply user-defined margins - if (m_opts.bottom) { - h += m_opts.strut.top; - } else { - h += m_opts.strut.bottom; - } + // Apply user-defined margins + if (m_opts.bottom) { + h += m_opts.strut.top; + } else { + h += m_opts.strut.bottom; + } - h = std::max(h, 0); + h = std::max(h, 0); - int correction = 0; + int correction = 0; - // Only apply correction if any space is requested - if (h > 0) { - /* - * Strut coordinates have to be relative to root window and not any monitor. - * If any monitor is not aligned at the top or bottom - */ - if (m_opts.bottom) { + // Only apply correction if any space is requested + if (h > 0) { /* - * For bottom-algined bars, the correction is the number of pixels between - * the root window's bottom edge and the monitor's bottom edge + * Strut coordinates have to be relative to root window and not any monitor. + * If any monitor is not aligned at the top or bottom */ - correction = geom->height - (m_opts.monitor->y + m_opts.monitor->h); - } else { - // For top-aligned bars, we simply add the monitor's y-position - correction = m_opts.monitor->y; - } + if (m_opts.bottom) { + /* + * For bottom-algined bars, the correction is the number of pixels between + * the root window's bottom edge and the monitor's bottom edge + */ + correction = geom->height - (m_opts.monitor->y + m_opts.monitor->h); + } else { + // For top-aligned bars, we simply add the monitor's y-position + correction = m_opts.monitor->y; + } - correction = std::max(correction, 0); + correction = std::max(correction, 0); + } + win.reconfigure_struts(m_opts.size.w, h + correction, m_opts.pos.x, m_opts.bottom); + } else { + // Set struts to 0 for invisible bars + win.reconfigure_struts(0, 0, 0, m_opts.bottom); } - - window win{m_connection, m_opts.window}; - win.reconfigure_struts(m_opts.size.w, h + correction, m_opts.pos.x, m_opts.bottom); } /** @@ -634,6 +639,8 @@ } void bar::map_window() { + m_visible = true; + /** * First reconfigures the window so that WMs that discard some information * when unmapping have the correct window properties (geometry etc). @@ -648,8 +655,6 @@ * mapping. Additionally updating the window position after mapping seems to fix that. */ reconfigure_pos(); - - m_visible = true; } void bar::trigger_click(mousebtn btn, int pos) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/polybar-3.6.2/src/components/controller.cpp new/polybar-3.6.3/src/components/controller.cpp --- old/polybar-3.6.2/src/components/controller.cpp 2022-04-03 19:55:39.000000000 +0200 +++ new/polybar-3.6.3/src/components/controller.cpp 2022-05-04 11:05:48.000000000 +0200 @@ -1,7 +1,5 @@ #include "components/controller.hpp" -#include <uv.h> - #include <csignal> #include <utility> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/polybar-3.6.2/src/components/renderer.cpp new/polybar-3.6.3/src/components/renderer.cpp --- old/polybar-3.6.2/src/components/renderer.cpp 2022-04-03 19:55:39.000000000 +0200 +++ new/polybar-3.6.3/src/components/renderer.cpp 2022-05-04 11:05:48.000000000 +0200 @@ -728,8 +728,12 @@ } } -void renderer::draw_offset(rgba color, double x, double w) { - if (w > 0 && color != m_bar.background) { +void renderer::draw_offset(const tags::context& ctxt, rgba color, double x, double w) { + if (w <= 0) { + return; + } + + if (color != m_bar.background) { m_log.trace_x("renderer: offset(x=%f, w=%f)", x, w); m_context->save(); *m_context << m_comp_bg; @@ -739,6 +743,14 @@ m_context->fill(); m_context->restore(); } + + if (ctxt.has_underline()) { + fill_underline(ctxt.get_ul(), x, w); + } + + if (ctxt.has_overline()) { + fill_overline(ctxt.get_ol(), x, w); + } } void renderer::render_offset(const tags::context& ctxt, const extent_val offset) { @@ -746,7 +758,7 @@ int offset_width = units_utils::extent_to_pixel(offset, m_bar.dpi_x); rgba bg = ctxt.get_bg(); - draw_offset(bg, m_blocks[m_align].x, offset_width); + draw_offset(ctxt, bg, m_blocks[m_align].x, offset_width); increase_x(offset_width); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/polybar-3.6.2/src/ipc/util.cpp new/polybar-3.6.3/src/ipc/util.cpp --- old/polybar-3.6.2/src/ipc/util.cpp 2022-04-03 19:55:39.000000000 +0200 +++ new/polybar-3.6.3/src/ipc/util.cpp 2022-05-04 11:05:48.000000000 +0200 @@ -1,6 +1,7 @@ #include "ipc/util.hpp" #include <sys/stat.h> +#include <unistd.h> #include "errors.hpp" #include "utils/env.hpp" @@ -12,8 +13,14 @@ namespace ipc { static constexpr auto SUFFIX = ".sock"; + static constexpr auto XDG_RUNTIME_DIR = "XDG_RUNTIME_DIR"; string get_runtime_path() { + if (env_util::has(XDG_RUNTIME_DIR)) { + return env_util::get("XDG_RUNTIME_DIR") + "/polybar"; + } else { + return "/tmp/polybar-" + to_string(getuid()); + } return env_util::get("XDG_RUNTIME_DIR", "/tmp") + "/polybar"; } @@ -59,6 +66,6 @@ return -1; } } -} // namespace ipc +} // namespace ipc POLYBAR_NS_END diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/polybar-3.6.2/src/modules/battery.cpp new/polybar-3.6.3/src/modules/battery.cpp --- old/polybar-3.6.2/src/modules/battery.cpp 2022-04-03 19:55:39.000000000 +0200 +++ new/polybar-3.6.3/src/modules/battery.cpp 2022-05-04 11:05:48.000000000 +0200 @@ -199,7 +199,7 @@ if (chrono::duration_cast<decltype(m_interval)>(now - m_lastpoll) > m_interval) { m_lastpoll = now; m_log.info("%s: Polling values (inotify fallback)", name()); - read(*m_capacity_reader); + on_event(nullptr); } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/polybar-3.6.2/src/modules/xworkspaces.cpp new/polybar-3.6.3/src/modules/xworkspaces.cpp --- old/polybar-3.6.2/src/modules/xworkspaces.cpp 2022-04-03 19:55:39.000000000 +0200 +++ new/polybar-3.6.3/src/modules/xworkspaces.cpp 2022-05-04 11:05:48.000000000 +0200 @@ -111,7 +111,8 @@ if (evt->atom == m_ewmh->_NET_CLIENT_LIST || evt->atom == m_ewmh->_NET_WM_DESKTOP) { rebuild_clientlist(); rebuild_desktop_states(); - } else if (evt->atom == m_ewmh->_NET_DESKTOP_NAMES || evt->atom == m_ewmh->_NET_NUMBER_OF_DESKTOPS) { + } else if (evt->atom == m_ewmh->_NET_DESKTOP_NAMES || evt->atom == m_ewmh->_NET_NUMBER_OF_DESKTOPS || + evt->atom == m_ewmh->_NET_DESKTOP_VIEWPORT) { m_desktop_names = get_desktop_names(); rebuild_desktops(); rebuild_clientlist(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/polybar-3.6.2/src/x11/window.cpp new/polybar-3.6.3/src/x11/window.cpp --- old/polybar-3.6.2/src/x11/window.cpp 2022-04-03 19:55:39.000000000 +0200 +++ new/polybar-3.6.3/src/x11/window.cpp 2022-05-04 11:05:48.000000000 +0200 @@ -57,14 +57,16 @@ window window::reconfigure_struts(uint32_t w, uint32_t strut, uint32_t x, bool bottom) { std::array<uint32_t, 12> values{}; + uint32_t end_x = std::max<int>(0, x + w - 1); + if (bottom) { values[to_integral(strut::BOTTOM)] = strut; values[to_integral(strut::BOTTOM_START_X)] = x; - values[to_integral(strut::BOTTOM_END_X)] = x + w - 1; + values[to_integral(strut::BOTTOM_END_X)] = end_x; } else { values[to_integral(strut::TOP)] = strut; values[to_integral(strut::TOP_START_X)] = x; - values[to_integral(strut::TOP_END_X)] = x + w - 1; + values[to_integral(strut::TOP_END_X)] = end_x; } connection().change_property_checked( diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/polybar-3.6.2/version.txt new/polybar-3.6.3/version.txt --- old/polybar-3.6.2/version.txt 2022-04-03 19:55:39.000000000 +0200 +++ new/polybar-3.6.3/version.txt 2022-05-04 11:05:48.000000000 +0200 @@ -1,4 +1,4 @@ # Polybar version information # Update this on every release # This is used to create the version string if a git repo is not available -3.6.2 +3.6.3