2018-08-22 07:58:49 -04:00
|
|
|
#pragma once
|
2018-10-03 17:14:51 -04:00
|
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
// Copyright (c) 2011-2013, Christopher Jeffrey
|
|
|
|
// Copyright (c) 2013 Richard Grenville <pyxlcy@gmail.com>
|
2018-08-22 07:58:49 -04:00
|
|
|
|
|
|
|
#include <stdbool.h>
|
|
|
|
|
2018-09-27 11:10:43 -04:00
|
|
|
#ifdef CONFIG_LIBCONFIG
|
2018-08-22 07:58:49 -04:00
|
|
|
#include <libconfig.h>
|
2018-09-27 11:10:43 -04:00
|
|
|
#endif
|
2018-08-22 07:58:49 -04:00
|
|
|
|
|
|
|
#include "common.h"
|
|
|
|
|
|
|
|
bool parse_long(const char *, long *);
|
|
|
|
const char *parse_matrix_readnum(const char *, double *);
|
2018-09-27 12:14:44 -04:00
|
|
|
xcb_render_fixed_t *parse_matrix(session_t *, const char *, const char **);
|
|
|
|
xcb_render_fixed_t *parse_conv_kern(session_t *, const char *, const char **);
|
|
|
|
bool parse_conv_kern_lst(session_t *, const char *, xcb_render_fixed_t **, int);
|
Convert XfixesRegion to pixman region
Re-did the painting logic, and document it.
It is unclear to me what is the previous painting logic. But the current
one is basically this:
1. Go through all windows top to bottom, and put visible windows (not
unmapped, opacity > 0, etc) into a linked list, from bottom to top
2. Accumulate a region of ignore on each window, which is basically the
region of screen that is obscured by all the windows above current
one.
3. Paint all the visible windows from bottom to top. Subtract the region
of ignore from the painting region. If we need to paint shadow, we
subtract the body of the window from the shadow painting region too,
because we don't want shadow behind the window.
4. region of ignore is invalidated when window stack change, an
window on top moved or changed shape, when window changed between
opaque and transparent, etc.
Notes:
It is unclear whether all the different shapes of a window (extents,
noframe, border, bounding shape, etc) are calculated correctly or not.
It is unclear if window shape related events are handled correctly or
not. Need more testing.
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2018-09-29 23:56:00 -04:00
|
|
|
bool parse_geometry(session_t *, const char *, region_t *);
|
2018-08-22 07:58:49 -04:00
|
|
|
bool parse_rule_opacity(session_t *, const char *);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Add a pattern to a condition linked list.
|
|
|
|
*/
|
|
|
|
bool condlst_add(session_t *, c2_lptr_t **, const char *);
|
|
|
|
|
|
|
|
#ifdef CONFIG_LIBCONFIG
|
|
|
|
FILE *
|
|
|
|
open_config_file(char *cpath, char **path);
|
|
|
|
|
|
|
|
void
|
|
|
|
parse_cfg_condlst(session_t *ps, const config_t *pcfg, c2_lptr_t **pcondlst,
|
|
|
|
const char *name);
|
|
|
|
|
|
|
|
void
|
|
|
|
parse_config(session_t *ps, struct options_tmp *pcfgtmp);
|
2018-08-22 10:12:29 -04:00
|
|
|
#else
|
|
|
|
static inline void parse_config(session_t *a, struct options_tmp *b) {
|
|
|
|
(void)a;
|
|
|
|
(void)b;
|
|
|
|
}
|
2018-08-22 07:58:49 -04:00
|
|
|
#endif
|