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:
parent
b9bf4fed60
commit
16bff8ff41
12
src/win.c
12
src/win.c
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue