mirror of
https://github.com/swaywm/sway.git
synced 2026-04-21 06:46:22 -04:00
feat: render tiling move indicator with round corners
This commit is contained in:
parent
1881b01d3f
commit
6ca742d4f2
6 changed files with 35 additions and 2 deletions
|
|
@ -4,7 +4,7 @@
|
|||
#include <GLES2/gl2.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
enum corner_location { NONE, TOP_LEFT, TOP_RIGHT, BOTTOM_LEFT, BOTTOM_RIGHT };
|
||||
enum corner_location { ALL, TOP_LEFT, TOP_RIGHT, BOTTOM_LEFT, BOTTOM_RIGHT };
|
||||
|
||||
struct gles2_tex_shader {
|
||||
GLuint program;
|
||||
|
|
@ -44,6 +44,7 @@ struct fx_renderer {
|
|||
GLint pos_attrib;
|
||||
} quad;
|
||||
|
||||
struct rounded_quad_shader rounded_quad;
|
||||
struct rounded_quad_shader rounded_tl_quad;
|
||||
struct rounded_quad_shader rounded_tr_quad;
|
||||
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@
|
|||
#include <wayland-server-core.h>
|
||||
#include <wlr/types/wlr_output.h>
|
||||
#include "config.h"
|
||||
#include "sway/desktop/fx_renderer.h"
|
||||
#include "sway/tree/node.h"
|
||||
#include "sway/tree/view.h"
|
||||
|
||||
|
|
@ -162,6 +163,12 @@ void render_rect(struct sway_output *output,
|
|||
pixman_region32_t *output_damage, const struct wlr_box *_box,
|
||||
float color[static 4]);
|
||||
|
||||
void render_rounded_rect(struct sway_output *output,
|
||||
pixman_region32_t *output_damage, const struct wlr_box *_box,
|
||||
float color[static 4], int corner_radius,
|
||||
enum corner_location corner_location);
|
||||
|
||||
|
||||
void premultiply_alpha(float color[4], float opacity);
|
||||
|
||||
void scale_box(struct wlr_box *box, float scale);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue