2018-08-22 19:58:49 +08:00
|
|
|
#pragma once
|
2018-10-04 05:14:51 +08:00
|
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
// Copyright (c) 2011-2013, Christopher Jeffrey
|
|
|
|
// Copyright (c) 2013 Richard Grenville <pyxlcy@gmail.com>
|
2018-08-22 19:58:49 +08:00
|
|
|
|
|
|
|
#include <stdbool.h>
|
|
|
|
|
2018-09-27 23:10:43 +08:00
|
|
|
#ifdef CONFIG_LIBCONFIG
|
2018-08-22 19:58:49 +08:00
|
|
|
#include <libconfig.h>
|
2018-09-27 23:10:43 +08:00
|
|
|
#endif
|
2018-08-22 19:58:49 +08:00
|
|
|
|
|
|
|
#include "common.h"
|
|
|
|
|
|
|
|
bool parse_long(const char *, long *);
|
|
|
|
const char *parse_matrix_readnum(const char *, double *);
|
2018-09-28 00:14:44 +08: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-30 11:56:00 +08:00
|
|
|
bool parse_geometry(session_t *, const char *, region_t *);
|
2018-08-22 19:58:49 +08: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
|
|
|
|
void
|
2018-12-05 00:28:19 +08:00
|
|
|
parse_config_libconfig(session_t *ps, bool *shadow_enable,
|
|
|
|
bool *fading_enable, win_option_mask_t *winopt_mask);
|
|
|
|
#endif
|
2018-08-22 19:58:49 +08:00
|
|
|
|
|
|
|
void
|
2018-12-04 21:44:16 +08:00
|
|
|
parse_config(session_t *ps, bool *shadow_enable,
|
|
|
|
bool *fading_enable, win_option_mask_t *winopt_mask);
|