From 1ddd8bd1e16c2fcbd79fa0476619aea8c259c688 Mon Sep 17 00:00:00 2001 From: patrick96 Date: Sun, 9 May 2021 21:19:15 +0200 Subject: [PATCH 1/5] fix(build): Disable sphinx manpage section dirs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Before sphinx 4.0, this was the default but was changed in 4.0. Now by default the folder structure looks like this: man ├── 1 │   └── polybar.1 └── 5 └── polybar.5 This restores the old behavior where there weren't individual folders for the different sections. Fixes #2424 Ref: https://www.sphinx-doc.org/en/master/changes.html#id14 --- CHANGELOG.md | 3 +++ doc/conf.py | 3 +++ 2 files changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 44988bd1..2d03d7c4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] +### Build +- Support building documentation on sphinx 4.0 ([`#2424`](https://github.com/polybar/polybar/issues/2424)) + ## [3.5.5] - 2021-03-01 ### Build - Support older python sphinx versions again ([`#2356`](https://github.com/polybar/polybar/issues/2356)) diff --git a/doc/conf.py b/doc/conf.py index 9bd12125..656c7291 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -185,6 +185,9 @@ man_pages = [ ('man/polybar.5', 'polybar', 'configuration file for polybar(1)', [], 5) ] +man_make_section_directory = False + + # -- Options for Texinfo output ---------------------------------------------- # Grouping the document tree into Texinfo files. List of tuples From ad987098ff10a03f74a5388de0b920cdcf67dd1c Mon Sep 17 00:00:00 2001 From: patrick96 Date: Tue, 18 May 2021 11:02:10 +0200 Subject: [PATCH 2/5] fix(tray): Support clients with different depths XCB_BACK_PIXMAP_PARENT_RELATIVE requires that the client has the same depth as the tray window. There was an issue with dropbox having a depth of 32 and the tray window having a depth of 24 that caused the configuration of the icon to fail. It would then be displayed outside of the bar because the catch block was not hit (different exception). We now just don't configure XCB_CW_BACK_PIXMAP. This seems to work and is also what stalonetray does. This does not fix the issue with dropbox having an arbitrary background. Fixes #1679 Fixes #2430 --- CHANGELOG.md | 2 ++ src/x11/tray_manager.cpp | 16 +++++++--------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2d03d7c4..6fbc5e03 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] ### Build - Support building documentation on sphinx 4.0 ([`#2424`](https://github.com/polybar/polybar/issues/2424)) +### Fixed +- Tray icons sometimes appears outside of bar ([`#2430`](https://github.com/polybar/polybar/issues/2430), [`#1679`](https://github.com/polybar/polybar/issues/1679)) ## [3.5.5] - 2021-03-01 ### Build diff --git a/src/x11/tray_manager.cpp b/src/x11/tray_manager.cpp index 5cf503d1..44bac367 100644 --- a/src/x11/tray_manager.cpp +++ b/src/x11/tray_manager.cpp @@ -726,7 +726,7 @@ void tray_manager::track_selection_owner(xcb_window_t owner) { * Process client docking request */ void tray_manager::process_docking_request(xcb_window_t win) { - m_log.info("Processing docking request from %s", m_connection.id(win)); + m_log.info("Processing docking request from '%s' (%s)", ewmh_util::get_wm_name(win), m_connection.id(win)); m_clients.emplace_back(factory_util::shared(m_connection, win, m_opts.width, m_opts.height)); auto& client = m_clients.back(); @@ -734,18 +734,15 @@ void tray_manager::process_docking_request(xcb_window_t win) { try { m_log.trace("tray: Get client _XEMBED_INFO"); xembed::query(m_connection, win, client->xembed()); - } catch (const application_error& err) { - m_log.err(err.what()); - } catch (const xpp::x::error::window& err) { + } catch (const std::exception& err) { m_log.err("Failed to query _XEMBED_INFO, removing client... (%s)", err.what()); remove_client(win, true); return; } try { - const unsigned int mask{XCB_CW_BACK_PIXMAP | XCB_CW_EVENT_MASK}; - const unsigned int values[]{ - XCB_BACK_PIXMAP_PARENT_RELATIVE, XCB_EVENT_MASK_PROPERTY_CHANGE | XCB_EVENT_MASK_STRUCTURE_NOTIFY}; + const unsigned int mask = XCB_CW_EVENT_MASK; + const unsigned int values[]{XCB_EVENT_MASK_PROPERTY_CHANGE | XCB_EVENT_MASK_STRUCTURE_NOTIFY}; m_log.trace("tray: Update client window"); m_connection.change_window_attributes_checked(client->window(), mask, values); @@ -767,8 +764,9 @@ void tray_manager::process_docking_request(xcb_window_t win) { m_log.trace("tray: Map client"); m_connection.map_window_checked(client->window()); } - } catch (const xpp::x::error::window& err) { - m_log.err("Failed to setup tray client, removing... (%s)", err.what()); + + } catch (const std::exception& err) { + m_log.err("Failed to setup tray client removing... (%s)", err.what()); remove_client(win, false); } } From cbe4521737087a3113720b040cc0e043358188c7 Mon Sep 17 00:00:00 2001 From: patrick96 Date: Tue, 18 May 2021 11:05:02 +0200 Subject: [PATCH 3/5] tray: Do not swallow clear_window exceptions --- src/x11/tray_client.cpp | 9 +++------ src/x11/tray_manager.cpp | 16 ++++++++++++---- 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/src/x11/tray_client.cpp b/src/x11/tray_client.cpp index 9075083f..12978fad 100644 --- a/src/x11/tray_client.cpp +++ b/src/x11/tray_client.cpp @@ -1,9 +1,10 @@ +#include "x11/tray_client.hpp" + #include #include #include "utils/memory.hpp" #include "x11/connection.hpp" -#include "x11/tray_client.hpp" #include "x11/xembed.hpp" POLYBAR_NS @@ -28,11 +29,7 @@ unsigned int tray_client::height() const { } void tray_client::clear_window() const { - try { - m_connection.clear_area_checked(1, window(), 0, 0, width(), height()); - } catch (const xpp::x::error::window& err) { - // ignore - } + m_connection.clear_area_checked(1, window(), 0, 0, width(), height()); } /** diff --git a/src/x11/tray_manager.cpp b/src/x11/tray_manager.cpp index 44bac367..f8414538 100644 --- a/src/x11/tray_manager.cpp +++ b/src/x11/tray_manager.cpp @@ -427,13 +427,21 @@ void tray_manager::refresh_window() { m_connection.poly_fill_rectangle(m_pixmap, m_gc, 1, &rect); } - if (m_surface) + if (m_surface) { m_surface->flush(); + } m_connection.clear_area(0, m_tray, 0, 0, width, height); for (auto&& client : m_clients) { - client->clear_window(); + try { + if (client->mapped()) { + client->clear_window(); + } + } catch (const std::exception& e) { + m_log.err("Failed to clear tray client %s '%s' (%s)", m_connection.id(client->window()), + ewmh_util::get_wm_name(client->window()), e.what()); + } } m_connection.flush(); @@ -477,8 +485,8 @@ void tray_manager::create_window() { << cw_class(XCB_WINDOW_CLASS_INPUT_OUTPUT) << cw_params_backing_store(XCB_BACKING_STORE_WHEN_MAPPED) << cw_params_event_mask(XCB_EVENT_MASK_SUBSTRUCTURE_REDIRECT - |XCB_EVENT_MASK_STRUCTURE_NOTIFY - |XCB_EVENT_MASK_EXPOSURE) + |XCB_EVENT_MASK_STRUCTURE_NOTIFY + |XCB_EVENT_MASK_EXPOSURE) << cw_params_override_redirect(true); // clang-format on From d8f4d56a95b388cf7332b972d1a32e8039ba36fc Mon Sep 17 00:00:00 2001 From: patrick96 Date: Mon, 24 May 2021 00:51:18 +0200 Subject: [PATCH 4/5] Fix i3 module assertion failure This brings #2417 into the hotfix release Ref #2417 --- CHANGELOG.md | 1 + lib/i3ipcpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6fbc5e03..9e691031 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Support building documentation on sphinx 4.0 ([`#2424`](https://github.com/polybar/polybar/issues/2424)) ### Fixed - Tray icons sometimes appears outside of bar ([`#2430`](https://github.com/polybar/polybar/issues/2430), [`#1679`](https://github.com/polybar/polybar/issues/1679)) +- Crash in the i3 module ([`#2416`](https://github.com/polybar/polybar/issues/2416)) ## [3.5.5] - 2021-03-01 ### Build diff --git a/lib/i3ipcpp b/lib/i3ipcpp index cb008b30..86ddf710 160000 --- a/lib/i3ipcpp +++ b/lib/i3ipcpp @@ -1 +1 @@ -Subproject commit cb008b30fc5f3febfe467884cb0211ee3c16386b +Subproject commit 86ddf7102c6903ae0cc543071e2d375403fc0727 From eb9c192d041fa272982d8d5bc06bdb2322a3c4c0 Mon Sep 17 00:00:00 2001 From: patrick96 Date: Mon, 24 May 2021 01:00:50 +0200 Subject: [PATCH 5/5] Release 3.5.6 --- CHANGELOG.md | 4 +++- version.txt | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9e691031..80fa3a51 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] +## [3.5.6] - 2021-05-24 ### Build - Support building documentation on sphinx 4.0 ([`#2424`](https://github.com/polybar/polybar/issues/2424)) ### Fixed @@ -29,7 +30,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed - Empty color values are no longer treated as invalid and no longer produce an error. -[Unreleased]: https://github.com/polybar/polybar/compare/3.5.5...HEAD +[Unreleased]: https://github.com/polybar/polybar/compare/3.5.6...HEAD +[3.5.5]: https://github.com/polybar/polybar/releases/tag/3.5.6 [3.5.5]: https://github.com/polybar/polybar/releases/tag/3.5.5 [3.5.4]: https://github.com/polybar/polybar/releases/tag/3.5.4 [3.5.3]: https://github.com/polybar/polybar/releases/tag/3.5.3 diff --git a/version.txt b/version.txt index 207bcec8..e870d52e 100644 --- a/version.txt +++ b/version.txt @@ -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.5.5 +3.5.6