aboutsummaryrefslogtreecommitdiff
path: root/include/wlr
diff options
context:
space:
mode:
Diffstat (limited to 'include/wlr')
-rw-r--r--include/wlr/types/wlr_surface.h26
1 files changed, 14 insertions, 12 deletions
diff --git a/include/wlr/types/wlr_surface.h b/include/wlr/types/wlr_surface.h
index 07f19b67..c9abf042 100644
--- a/include/wlr/types/wlr_surface.h
+++ b/include/wlr/types/wlr_surface.h
@@ -18,6 +18,8 @@ struct wlr_frame_callback {
#define WLR_SURFACE_INVALID_INPUT_REGION 16
#define WLR_SURFACE_INVALID_TRANSFORM 32
#define WLR_SURFACE_INVALID_SCALE 64
+#define WLR_SURFACE_INVALID_SUBSURFACE_POSITION 128
+#define WLR_SURFACE_INVALID_FRAME_CALLBACK_LIST 256
struct wlr_surface_state {
uint32_t invalid;
@@ -29,6 +31,12 @@ struct wlr_surface_state {
int32_t scale;
int width, height;
int buffer_width, buffer_height;
+
+ struct {
+ int32_t x, y;
+ } subsurface_position;
+
+ struct wl_list frame_callback_list; // wl_surface.frame
};
struct wlr_subsurface {
@@ -36,25 +44,19 @@ struct wlr_subsurface {
struct wlr_surface *surface;
struct wlr_surface *parent;
- struct wlr_surface_state cached;
-
- struct {
- int32_t x, y;
- } position;
-
- struct {
- int32_t x, y;
- bool set;
- } pending_position;
+ struct wlr_surface_state *cached;
+ bool has_cache;
bool synchronized;
+
+ struct wl_list parent_link;
};
struct wlr_surface {
struct wl_resource *resource;
struct wlr_renderer *renderer;
struct wlr_texture *texture;
- struct wlr_surface_state current, pending;
+ struct wlr_surface_state *current, *pending;
const char *role; // the lifetime-bound role or null
float buffer_to_surface_matrix[16];
@@ -66,13 +68,13 @@ struct wlr_surface {
struct wl_signal destroy;
} signals;
- struct wl_list frame_callback_list; // wl_surface.frame
// destroy listener used by compositor
struct wl_listener compositor_listener;
void *compositor_data;
// subsurface properties
struct wlr_subsurface *subsurface;
+ struct wl_list subsurface_list; // wlr_subsurface::parent_link
void *data;
};