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.
This commit is contained in:
committed by
Jason Ekstrand
parent
cfff312204
commit
412e6a59eb
+3
-3
@@ -93,9 +93,9 @@ test_surface_configure(struct weston_surface *surface, int32_t sx, int32_t sy)
|
||||
struct weston_test_surface *test_surface = surface->configure_private;
|
||||
struct weston_test *test = test_surface->test;
|
||||
|
||||
if (wl_list_empty(&test_surface->view->layer_link))
|
||||
wl_list_insert(&test->layer.view_list,
|
||||
&test_surface->view->layer_link);
|
||||
if (wl_list_empty(&test_surface->view->layer_link.link))
|
||||
weston_layer_entry_insert(&test->layer.view_list,
|
||||
&test_surface->view->layer_link);
|
||||
|
||||
weston_view_set_position(test_surface->view,
|
||||
test_surface->x, test_surface->y);
|
||||
|
||||
Reference in New Issue
Block a user