summaryrefslogtreecommitdiff
path: root/src/compositor.h
diff options
context:
space:
mode:
authorGiulio Camuffo <giuliocamuffo@gmail.com>2014-07-09 22:12:56 +0300
committerJason Ekstrand <jason.ekstrand@intel.com>2014-07-23 12:34:33 -0700
commit412e6a59eb90da5b29226e0b32f4a1a8e21c6500 (patch)
tree656c515d17dcc9308bc6100719a320a60c55b5ac /src/compositor.h
parentcfff3122046b346f0b47b6f7dfbbdf62352cfe61 (diff)
downloadweston-412e6a59eb90da5b29226e0b32f4a1a8e21c6500.tar.gz
compositor: keep track of the weston_layer a weston_view is in
This introduces a new struct, weston_layer_entry, which is now used in place of wl_list to keep the link for the layer list in weston_view and the head of the list in weston_layer. weston_layer_entry also has a weston_layer*, which points to the layer the view is in or, in the case the entry it's the head of the list, to the layer itself.
Diffstat (limited to 'src/compositor.h')
-rw-r--r--src/compositor.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/compositor.h b/src/compositor.h
index d4a2dbb7..9bbd8440 100644
--- a/src/compositor.h
+++ b/src/compositor.h
@@ -526,8 +526,13 @@ enum {
* to off */
};
+struct weston_layer_entry {
+ struct wl_list link;
+ struct weston_layer *layer;
+};
+
struct weston_layer {
- struct wl_list view_list;
+ struct weston_layer_entry view_list;
struct wl_list link;
};
@@ -731,7 +736,7 @@ struct weston_view {
struct wl_signal destroy_signal;
struct wl_list link;
- struct wl_list layer_link;
+ struct weston_layer_entry layer_link;
struct weston_plane *plane;
pixman_region32_t clip;
@@ -997,6 +1002,11 @@ void
notify_touch_frame(struct weston_seat *seat);
void
+weston_layer_entry_insert(struct weston_layer_entry *list,
+ struct weston_layer_entry *entry);
+void
+weston_layer_entry_remove(struct weston_layer_entry *entry);
+void
weston_layer_init(struct weston_layer *layer, struct wl_list *below);
void