Initial implementation of configurable GLESv2 drop shadows

This commit is contained in:
topisani 2019-06-15 11:10:24 +02:00
parent bdd4d69205
commit 678aee73e5
13 changed files with 453 additions and 5 deletions

View file

@ -190,6 +190,10 @@ sway_cmd cmd_workspace;
sway_cmd cmd_workspace_layout;
sway_cmd cmd_ws_auto_back_and_forth;
sway_cmd cmd_xwayland;
sway_cmd cmd_shadows_focused;
sway_cmd cmd_shadows_focused_inactive;
sway_cmd cmd_shadows_unfocused;
sway_cmd cmd_shadows_urgent;
sway_cmd bar_cmd_bindcode;
sway_cmd bar_cmd_binding_mode_indicator;

View file

@ -317,6 +317,12 @@ struct border_colors {
float child_border[4];
};
struct shadow_config {
int offset;
int radius;
float color[4];
};
enum edge_border_types {
E_NONE, /**< Don't hide edge borders */
E_VERTICAL, /**< hide vertical edge borders */
@ -504,6 +510,15 @@ struct sway_config {
float background[4];
} border_colors;
#if HAVE_SHADOWS
struct {
struct shadow_config focused;
struct shadow_config focused_inactive;
struct shadow_config unfocused;
struct shadow_config urgent;
} shadow_config;
#endif
// floating view
int32_t floating_maximum_width;
int32_t floating_maximum_height;

View file

@ -101,6 +101,8 @@ struct sway_workspace *output_get_active_workspace(struct sway_output *output);
void output_render(struct sway_output *output, struct timespec *when,
pixman_region32_t *damage);
void output_init_shadow_shader();
void output_surface_for_each_surface(struct sway_output *output,
struct wlr_surface *surface, double ox, double oy,
sway_surface_iterator_func_t iterator, void *user_data);