subsurface_link_surface(subsurface, surface);
subsurface_link_parent(subsurface, parent);
- ds_inf("New ds_subsurface %p: surface %p, parent surface %p",
+ ds_inf("New ds_subsurface(%p): surface(%p), parent surface(%p)",
subsurface, surface, parent);
wl_signal_emit_mutable(&parent->events.new_subsurface, subsurface);
{
struct ds_surface *surface = subsurface->surface;
struct ds_subsurface *child;
+ bool need_sync;
- if (subsurface_is_synchronized(subsurface)) {
+ need_sync = subsurface_is_synchronized(subsurface);
+
+ ds_dbg("ds_subsurface(%p) surface(%p) commit: need_sync(%d) has_cache(%d)",
+ subsurface, subsurface->surface, need_sync, subsurface->has_cache);
+
+ if (need_sync) {
surface_state_init(&subsurface->cached);
surface_state_move(&subsurface->cached, &surface->pending);
subsurface->has_cache = true;
{
if (subsurface->current.x != subsurface->pending.x ||
subsurface->current.y != subsurface->pending.y) {
+ ds_inf("ds_subsurface(%p) surface(%p) request_move: old(%d,%d) new(%d,%d)",
+ subsurface, subsurface->surface,
+ subsurface->current.x, subsurface->current.y,
+ subsurface->pending.x, subsurface->pending.y);
+
subsurface->current.x = subsurface->pending.x;
subsurface->current.y = subsurface->pending.y;
if (!subsurface)
return;
+ ds_inf("ds_subsurface(%p) surface(%p) set_position: (%d,%d)",
+ subsurface, subsurface->surface, x, y);
+
subsurface->pending.x = x;
subsurface->pending.y = y;
}
return;
sibling_surface = ds_surface_from_resource(sibling_resource);
+
+ ds_inf("ds_subsurface(%p) surface(%p) place_above: sibling surface(%p)",
+ subsurface, subsurface->surface, sibling_surface);
+
if (sibling_surface == subsurface->parent) {
node = &subsurface->parent->pending.subsurfaces_above;
}
return;
sibling_surface = ds_surface_from_resource(sibling_resource);
+
+ ds_inf("ds_subsurface(%p) surface(%p) place_below: sibling surface(%p)",
+ subsurface, subsurface->surface, sibling_surface);
+
if (sibling_surface == subsurface->parent) {
node = &subsurface->parent->pending.subsurfaces_below;
}
if (!subsurface)
return;
+ ds_inf("ds_subsurface(%p) surface(%p) set_sync",
+ subsurface, subsurface->surface);
+
subsurface->synchronized = true;
}
if (!subsurface)
return;
+ ds_inf("ds_subsurface(%p) surface(%p) set_desync",
+ subsurface, subsurface->surface);
+
if (subsurface->synchronized) {
subsurface->synchronized = false;
static void
subsurface_destroy(struct ds_subsurface *subsurface)
{
+ ds_inf("Destroy ds_subsurface(%p) surface(%p)",
+ subsurface, subsurface->surface);
+
wl_signal_emit_mutable(&subsurface->events.destroy, subsurface);
if (subsurface->parent)
struct ds_surface *surface = subsurface->surface;
struct ds_subsurface *child;
+ ds_dbg("ds_subsurface(%p) surface(%p) synchronized commit",
+ subsurface, subsurface->surface);
+
if (subsurface->has_cache) {
surface_state_move(&subsurface->cached, &surface->pending);
surface_commit_state(surface, &subsurface->cached);