1
0
Fork 0
mirror of https://github.com/polybar/polybar.git synced 2024-10-27 05:23:39 -04:00
polybar/include/utils/bspwm.hpp
patrick96 c9752598a5 fix(bspwm): Restack against topmost root window.
The ewmh strategy has to be dropped because the
`_NET_SUPPORTING_WM_CHECK` window may (at least in bspwm) appear
anywhere in the window stack.

To fix the overlapping monitors issue in #2873, we simply restack
against the topmost of these root windows.

Fixes #2972
Fixes #2873 (again)
2023-10-08 21:04:29 +02:00

30 lines
554 B
C++

#pragma once
#include "common.hpp"
#include "utils/restack.hpp"
#include "utils/socket.hpp"
POLYBAR_NS
class connection;
namespace bspwm_util {
using connection_t = unique_ptr<socket_util::unix_connection>;
struct payload {
char data[BUFSIZ]{'\0'};
size_t len = 0;
};
using payload_t = unique_ptr<payload>;
restack_util::params get_restack_params(connection& conn);
string get_socket_path();
payload_t make_payload(const string& cmd);
connection_t make_connection();
connection_t make_subscriber();
} // namespace bspwm_util
POLYBAR_NS_END