polybar-dwm/include/x11/icccm.hpp
patrick96 74067c52c3 fix: Set WM_SIZE_HINTS to fix position in openbox
When polybar is remapped (either through IPC or something like xdo
show), openbox positions it somewhere on the screen using the same
positioning algorithm as it would for regular windows.

If the position and size is set in the WM_SIZE_HINTS atom, openbox will
respect the position and size declared by the window.

Fixes #2021
2022-02-21 21:40:33 +01:00

21 lines
617 B
C++

#pragma once
#include <xcb/xcb_icccm.h>
#include "common.hpp"
POLYBAR_NS
namespace icccm_util {
string get_wm_name(xcb_connection_t* c, xcb_window_t w);
string get_reply_string(xcb_icccm_get_text_property_reply_t* reply);
void set_wm_name(xcb_connection_t* c, xcb_window_t w, const char* wmname, size_t l, const char* wmclass, size_t l2);
void set_wm_protocols(xcb_connection_t* c, xcb_window_t w, vector<xcb_atom_t> flags);
bool get_wm_urgency(xcb_connection_t* c, xcb_window_t w);
void set_wm_size_hints(xcb_connection_t* c, xcb_window_t w, int x, int y, int width, int height);
}
POLYBAR_NS_END