1
0
Fork 0
mirror of https://github.com/yshui/picom.git synced 2024-11-11 13:51:02 -05:00

win: add managed_win_internal

Which includes the pending update flags for the window.

Using an internal struct makes sure the window update flags are opaque outside
of win.c

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
Yuxuan Shui 2019-09-20 01:54:14 +01:00
parent b9bf4fed60
commit 16bff8ff41
No known key found for this signature in database
GPG key ID: 37C999F617EA1A47

View file

@ -43,6 +43,14 @@
#include "win.h"
// TODO Make more window states internal
struct managed_win_internal {
struct managed_win base;
/// A bit mask of unhandled window updates
uint_fast32_t pending_updates;
};
#define OPAQUE (0xffffffff)
static const int WIN_GET_LEADER_MAX_RECURSION = 20;
static const int ROUNDED_PIXELS = 1;
@ -1244,7 +1252,9 @@ struct win *fill_win(session_t *ps, struct win *w) {
}
// Allocate and initialize the new win structure
auto new = cmalloc(struct managed_win);
auto new_internal = cmalloc(struct managed_win_internal);
auto new = (struct managed_win *)new_internal;
new_internal->pending_updates = 0;
// Fill structure
// We only need to initialize the part that are not initialized