1
0
Fork 0
mirror of https://github.com/yshui/picom.git synced 2024-11-18 13:55:36 -05:00
picom/src/c2.h
Yuxuan Shui a826e0ce79
Window state tracking refactor
Window state tracking is basically the back bond of window fading. We
add a new enum field to the win struct to track the state of the window,
instead of using a set of boolean variables. We also remove the fading
callbacks, since it is only used for fading, so the potential of code
reuse is lost. And it makes the code slightly harder to understand.

Also fixed a problem that --no-fading-openclose is not behaving as
advertised (from my observation, enabling this flag disables fading
entirely, instead of just diabling it for open/close).

Also uses double for opacity everywhere internally. Use opacity_t only
when setting X opacity prop.

TODO: Remove win::*_last

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2019-02-17 16:37:28 +00:00

26 lines
622 B
C

// SPDX-License-Identifier: MIT
/*
* Compton - a compositor for X11
*
* Based on `xcompmgr` - Copyright (c) 2003, Keith Packard
*
* Copyright (c) 2011-2013, Christopher Jeffrey
* See LICENSE-mit for more information.
*
*/
#pragma once
#include <stdbool.h>
typedef struct _c2_lptr c2_lptr_t;
typedef struct session session_t;
typedef struct win win;
c2_lptr_t *c2_parse(c2_lptr_t **pcondlst, const char *pattern, void *data);
c2_lptr_t *c2_free_lptr(c2_lptr_t *lp);
bool c2_match(session_t *ps, const win *w, const c2_lptr_t *condlst, void **pdata);
bool c2_list_postprocess(session_t *ps, c2_lptr_t *list);