1
0
Fork 0
mirror of https://github.com/polybar/polybar.git synced 2024-11-11 13:50:56 -05:00
polybar/include/x11/generic.hpp
Michael Carlberg 7f5117b7cc fix(tray): Improve pseudo-transparency handling
- Make sure previously drawn content is cleared
- Redraw tray clients on XCB_EXPOSE
- Prevent void parts of the root pixmap being copied

Ref #187
2016-12-05 03:56:04 +01:00

24 lines
588 B
C++

#pragma once
#include <xcb/xcb.h>
#include "common.hpp"
POLYBAR_NS
namespace {
inline bool operator==(const xcb_rectangle_t& a, const xcb_rectangle_t& b) {
return a.width == b.width && a.height == b.height && a.x == b.x && a.y == b.y;
}
inline bool operator!=(const xcb_rectangle_t& a, const xcb_rectangle_t& b) {
return !(a == b);
}
inline bool operator==(const xcb_rectangle_t& a, int b) {
return a.width == b && a.height == b && a.x == b && a.y == b;
}
inline bool operator!=(const xcb_rectangle_t& a, int b) {
return !(a == b);
}
}
POLYBAR_NS_END