mirror of
https://github.com/polybar/polybar.git
synced 2026-02-24 06:26:03 +00:00
restack: Make bspwm first try ewmh strategy
This commit is contained in:
committed by
Patrick Ziegler
parent
4f9f07eefd
commit
2c23f7a87f
@ -38,7 +38,13 @@ vector<xcb_window_t> root_windows(connection& conn) {
|
||||
/**
|
||||
* Returns window against which to restack.
|
||||
*/
|
||||
xcb_window_t get_restack_sibling(connection& conn, const monitor_t& mon) {
|
||||
restack_util::params get_restack_params(connection& conn, const monitor_t& mon, xcb_window_t bar_window) {
|
||||
auto ewmh_params = restack_util::get_ewmh_params(conn);
|
||||
|
||||
if (restack_util::are_siblings(conn, bar_window, ewmh_params.first)) {
|
||||
return ewmh_params;
|
||||
}
|
||||
|
||||
for (auto&& root : root_windows(conn)) {
|
||||
auto geom = conn.get_geometry(root);
|
||||
|
||||
@ -49,10 +55,10 @@ xcb_window_t get_restack_sibling(connection& conn, const monitor_t& mon) {
|
||||
continue;
|
||||
}
|
||||
|
||||
return root;
|
||||
return {root, XCB_STACK_MODE_ABOVE};
|
||||
}
|
||||
|
||||
return XCB_NONE;
|
||||
return restack_util::NONE_PARAMS;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user