Merge branch 'hotfix/3.5.6'

This commit is contained in:
patrick96 2021-05-24 01:07:24 +02:00
commit c65f6857e1
No known key found for this signature in database
GPG Key ID: 521E5E03AEBCA1A7
5 changed files with 36 additions and 21 deletions

View File

@ -1,4 +1,5 @@
# Changelog # Changelog
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file.
Each release should have the following subsections, if entries exist, in the Each release should have the following subsections, if entries exist, in the
given order: `Breaking`, `Build`, `Deprecated`, `Removed`, `Added`, `Changed`, given order: `Breaking`, `Build`, `Deprecated`, `Removed`, `Added`, `Changed`,
@ -121,6 +122,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- `internal/backlight`: With amdgpu backlights, the brightness indicator was slightly behind. - `internal/backlight`: With amdgpu backlights, the brightness indicator was slightly behind.
([`#2367](https://github.com/polybar/polybar/issues/2367)) ([`#2367](https://github.com/polybar/polybar/issues/2367))
## [3.5.6] - 2021-05-24
### 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))
- Crash in the i3 module ([`#2416`](https://github.com/polybar/polybar/issues/2416))
## [3.5.5] - 2021-03-01 ## [3.5.5] - 2021-03-01
### Build ### Build
- Support older python sphinx versions again ([`#2356`](https://github.com/polybar/polybar/issues/2356)) - Support older python sphinx versions again ([`#2356`](https://github.com/polybar/polybar/issues/2356))
@ -135,7 +143,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed ### Fixed
- Empty color values are no longer treated as invalid and no longer produce an error. - 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.6]: 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.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.4]: https://github.com/polybar/polybar/releases/tag/3.5.4
[3.5.3]: https://github.com/polybar/polybar/releases/tag/3.5.3 [3.5.3]: https://github.com/polybar/polybar/releases/tag/3.5.3

View File

@ -185,6 +185,9 @@ man_pages = [
('man/polybar.5', 'polybar', 'configuration file for polybar(1)', [], 5) ('man/polybar.5', 'polybar', 'configuration file for polybar(1)', [], 5)
] ]
man_make_section_directory = False
# -- Options for Texinfo output ---------------------------------------------- # -- Options for Texinfo output ----------------------------------------------
# Grouping the document tree into Texinfo files. List of tuples # Grouping the document tree into Texinfo files. List of tuples

View File

@ -1,9 +1,10 @@
#include "x11/tray_client.hpp"
#include <xcb/xcb.h> #include <xcb/xcb.h>
#include <xcb/xcb_aux.h> #include <xcb/xcb_aux.h>
#include "utils/memory.hpp" #include "utils/memory.hpp"
#include "x11/connection.hpp" #include "x11/connection.hpp"
#include "x11/tray_client.hpp"
#include "x11/xembed.hpp" #include "x11/xembed.hpp"
POLYBAR_NS POLYBAR_NS
@ -28,11 +29,7 @@ unsigned int tray_client::height() const {
} }
void tray_client::clear_window() const { void tray_client::clear_window() const {
try {
m_connection.clear_area_checked(1, window(), 0, 0, width(), height()); m_connection.clear_area_checked(1, window(), 0, 0, width(), height());
} catch (const xpp::x::error::window& err) {
// ignore
}
} }
/** /**

View File

@ -427,14 +427,22 @@ void tray_manager::refresh_window() {
m_connection.poly_fill_rectangle(m_pixmap, m_gc, 1, &rect); m_connection.poly_fill_rectangle(m_pixmap, m_gc, 1, &rect);
} }
if (m_surface) if (m_surface) {
m_surface->flush(); m_surface->flush();
}
m_connection.clear_area(0, m_tray, 0, 0, width, height); m_connection.clear_area(0, m_tray, 0, 0, width, height);
for (auto&& client : m_clients) { for (auto&& client : m_clients) {
try {
if (client->mapped()) {
client->clear_window(); 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(); m_connection.flush();
@ -726,7 +734,7 @@ void tray_manager::track_selection_owner(xcb_window_t owner) {
* Process client docking request * Process client docking request
*/ */
void tray_manager::process_docking_request(xcb_window_t win) { 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<tray_client>(m_connection, win, m_opts.width, m_opts.height)); m_clients.emplace_back(factory_util::shared<tray_client>(m_connection, win, m_opts.width, m_opts.height));
auto& client = m_clients.back(); auto& client = m_clients.back();
@ -734,18 +742,15 @@ void tray_manager::process_docking_request(xcb_window_t win) {
try { try {
m_log.trace("tray: Get client _XEMBED_INFO"); m_log.trace("tray: Get client _XEMBED_INFO");
xembed::query(m_connection, win, client->xembed()); xembed::query(m_connection, win, client->xembed());
} catch (const application_error& err) { } catch (const std::exception& err) {
m_log.err(err.what());
} catch (const xpp::x::error::window& err) {
m_log.err("Failed to query _XEMBED_INFO, removing client... (%s)", err.what()); m_log.err("Failed to query _XEMBED_INFO, removing client... (%s)", err.what());
remove_client(win, true); remove_client(win, true);
return; return;
} }
try { try {
const unsigned int mask{XCB_CW_BACK_PIXMAP | XCB_CW_EVENT_MASK}; const unsigned int mask = XCB_CW_EVENT_MASK;
const unsigned int values[]{ const unsigned int values[]{XCB_EVENT_MASK_PROPERTY_CHANGE | XCB_EVENT_MASK_STRUCTURE_NOTIFY};
XCB_BACK_PIXMAP_PARENT_RELATIVE, XCB_EVENT_MASK_PROPERTY_CHANGE | XCB_EVENT_MASK_STRUCTURE_NOTIFY};
m_log.trace("tray: Update client window"); m_log.trace("tray: Update client window");
m_connection.change_window_attributes_checked(client->window(), mask, values); m_connection.change_window_attributes_checked(client->window(), mask, values);
@ -767,8 +772,9 @@ void tray_manager::process_docking_request(xcb_window_t win) {
m_log.trace("tray: Map client"); m_log.trace("tray: Map client");
m_connection.map_window_checked(client->window()); 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); remove_client(win, false);
} }
} }

View File

@ -1,4 +1,4 @@
# Polybar version information # Polybar version information
# Update this on every release # Update this on every release
# This is used to create the version string if a git repo is not available # This is used to create the version string if a git repo is not available
3.5.5 3.5.6