diff --git a/CHANGELOG.md b/CHANGELOG.md index 47f88c97..64802916 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -161,7 +161,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Increased the double click interval from 150ms to 400ms. - Stop ignoring actions if they arrive while the previous one hasn't been processed yet. ([`#2469`](https://github.com/polybar/polybar/issues/2469)) -- Polybar can now be run without passing the bar name as argument given that +- Polybar can now be run without passing the bar name as argument given that the configuration file only defines one bar ([`#2525`](https://github.com/polybar/polybar/issues/2525)) @@ -182,8 +182,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ([`#2371`](https://github.com/polybar/polybar/issues/2371)) - `polybar -m` used to show both physical outputs and randr monitors, even if the outputs were covered by monitors. ([`#2481`](https://github.com/polybar/polybar/issues/2481)) -- `internal/xworkspaces`: Broken scroll-wrapping and order of workspaces when scrolling - ([`#2491`](https://github.com/polybar/polybar/issues/2491)) +- `internal/xworkspaces`: + - Broken scroll-wrapping and order of workspaces when scrolling + ([`#2491`](https://github.com/polybar/polybar/issues/2491)) + - Module would error if WM was not full started up. + ([`#1915`](https://github.com/polybar/polybar/issues/1915)) ## [3.5.7] - 2021-09-21 ### Fixed diff --git a/include/modules/xworkspaces.hpp b/include/modules/xworkspaces.hpp index 58268360..72da2b62 100644 --- a/include/modules/xworkspaces.hpp +++ b/include/modules/xworkspaces.hpp @@ -86,12 +86,10 @@ namespace modules { ewmh_connection_t m_ewmh; vector m_monitors; - bool m_monitorsupport{true}; vector m_desktop_names; vector m_urgent_desktops; unsigned int m_current_desktop; - string m_current_desktop_name; /** * Maps an xcb window to its desktop number diff --git a/src/modules/xworkspaces.cpp b/src/modules/xworkspaces.cpp index b2acc2ea..e2bfd695 100644 --- a/src/modules/xworkspaces.cpp +++ b/src/modules/xworkspaces.cpp @@ -50,16 +50,6 @@ namespace modules { throw module_error("Failed to initialize ewmh atoms"); } - // Check if the WM supports _NET_CURRENT_DESKTOP - if (!ewmh_util::supports(m_ewmh->_NET_CURRENT_DESKTOP)) { - throw module_error("The WM does not support _NET_CURRENT_DESKTOP, aborting..."); - } - - // Check if the WM supports _NET_DESKTOP_VIEWPORT - if (!(m_monitorsupport = ewmh_util::supports(m_ewmh->_NET_DESKTOP_VIEWPORT)) && m_pinworkspaces) { - throw module_error("The WM does not support _NET_DESKTOP_VIEWPORT (required when `pin-workspaces = true`)"); - } - // Add formats and elements m_formatter->add(DEFAULT_FORMAT, TAG_LABEL_STATE, {TAG_LABEL_STATE, TAG_LABEL_MONITOR}); @@ -106,11 +96,6 @@ namespace modules { void xworkspaces_module::update_current_desktop() { m_current_desktop = ewmh_util::get_current_desktop(); - if (m_current_desktop < m_desktop_names.size()) { - m_current_desktop_name = m_desktop_names[m_current_desktop]; - } else { - throw module_error("The current desktop is outside of the number of desktops reported by the WM"); - } } /** @@ -204,10 +189,7 @@ namespace modules { * We use this to map workspaces to viewports, desktop i is at position * ws_positions[i]. */ - vector ws_positions; - if (m_monitorsupport) { - ws_positions = ewmh_util::get_desktop_viewports(); - } + vector ws_positions = ewmh_util::get_desktop_viewports(); /* * Not all desktops were assigned a viewport, add (0, 0) for all missing