mirror of
https://github.com/yshui/picom.git
synced 2025-10-30 23:46:46 -04:00
wm/win: separate per-window options into their own struct
It's easier to just store them together, since the same group of information is needed for parsed window rules, and for window rendering. Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
parent
797e60f618
commit
cdf25b07dc
16 changed files with 407 additions and 372 deletions
|
|
@ -28,6 +28,19 @@ typedef enum {
|
|||
|
||||
enum tristate { TRI_FALSE = -1, TRI_UNKNOWN = 0, TRI_TRUE = 1 };
|
||||
|
||||
/// Return value if it's not TRI_UNKNOWN, otherwise return fallback.
|
||||
static inline enum tristate tri_or(enum tristate value, enum tristate fallback) {
|
||||
return value ?: fallback;
|
||||
}
|
||||
|
||||
static inline bool tri_or_bool(enum tristate value, bool fallback) {
|
||||
return value == TRI_UNKNOWN ? fallback : value == TRI_TRUE;
|
||||
}
|
||||
|
||||
static inline enum tristate tri_from_bool(bool value) {
|
||||
return value ? TRI_TRUE : TRI_FALSE;
|
||||
}
|
||||
|
||||
/// A structure representing margins around a rectangle.
|
||||
typedef struct {
|
||||
int top;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue