aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authoremersion <contact@emersion.fr>2018-06-21 22:39:26 +0100
committeremersion <contact@emersion.fr>2018-07-04 19:12:17 +0100
commit3c0d672ebd9e1776f106ca7d963654893585a5ca (patch)
tree63cd6dd32e4e5aed2a2bc282006e09fb68b81655 /include
parent64836ddfe7fe9097ed4ebe289d1ad17295c32763 (diff)
surface: make pending and current embedded structs
Diffstat (limited to 'include')
-rw-r--r--include/wlr/types/wlr_surface.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/include/wlr/types/wlr_surface.h b/include/wlr/types/wlr_surface.h
index 526679d6..423cc886 100644
--- a/include/wlr/types/wlr_surface.h
+++ b/include/wlr/types/wlr_surface.h
@@ -23,7 +23,6 @@ struct wlr_surface_state {
uint32_t committed; // enum wlr_surface_state_field
struct wl_resource *buffer;
- struct wl_listener buffer_destroy_listener;
int32_t sx, sy;
pixman_region32_t surface_damage, buffer_damage;
pixman_region32_t opaque, input;
@@ -33,6 +32,8 @@ struct wlr_surface_state {
int width, height; // in surface-local coordinates
int buffer_width, buffer_height;
+
+ struct wl_listener buffer_destroy_listener;
};
struct wlr_surface {
@@ -45,7 +46,12 @@ struct wlr_surface {
* or something went wrong with uploading the buffer.
*/
struct wlr_buffer *buffer;
- struct wlr_surface_state *current, *pending;
+ /**
+ * `current` contains the current, committed surface state. `pending`
+ * accumulates state changes from the client between commits and shouldn't
+ * be accessed by the compositor directly.
+ */
+ struct wlr_surface_state current, pending;
const char *role; // the lifetime-bound role or null
struct {
@@ -79,7 +85,7 @@ struct wlr_subsurface {
struct wlr_subsurface_state current, pending;
- struct wlr_surface_state *cached;
+ struct wlr_surface_state cached;
bool has_cache;
bool synchronized;