mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-26 22:55:58 +01:00
surface: inline surface_commit_pending()
This commit is contained in:
parent
cf56596565
commit
610f0c0805
1 changed files with 11 additions and 15 deletions
|
@ -496,20 +496,6 @@ static void surface_commit_state(struct wlr_surface *surface,
|
||||||
wlr_signal_emit_safe(&surface->events.commit, surface);
|
wlr_signal_emit_safe(&surface->events.commit, surface);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void surface_commit_pending(struct wlr_surface *surface) {
|
|
||||||
surface_finalize_pending(surface);
|
|
||||||
|
|
||||||
if (surface->role && surface->role->precommit) {
|
|
||||||
surface->role->precommit(surface);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (surface->pending.cached_state_locks > 0 || !wl_list_empty(&surface->cached)) {
|
|
||||||
surface_cache_pending(surface);
|
|
||||||
} else {
|
|
||||||
surface_commit_state(surface, &surface->pending);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static bool subsurface_is_synchronized(struct wlr_subsurface *subsurface) {
|
static bool subsurface_is_synchronized(struct wlr_subsurface *subsurface) {
|
||||||
while (subsurface != NULL) {
|
while (subsurface != NULL) {
|
||||||
if (subsurface->synchronized) {
|
if (subsurface->synchronized) {
|
||||||
|
@ -578,7 +564,17 @@ static void surface_handle_commit(struct wl_client *client,
|
||||||
subsurface_commit(subsurface);
|
subsurface_commit(subsurface);
|
||||||
}
|
}
|
||||||
|
|
||||||
surface_commit_pending(surface);
|
surface_finalize_pending(surface);
|
||||||
|
|
||||||
|
if (surface->role && surface->role->precommit) {
|
||||||
|
surface->role->precommit(surface);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (surface->pending.cached_state_locks > 0 || !wl_list_empty(&surface->cached)) {
|
||||||
|
surface_cache_pending(surface);
|
||||||
|
} else {
|
||||||
|
surface_commit_state(surface, &surface->pending);
|
||||||
|
}
|
||||||
|
|
||||||
wl_list_for_each(subsurface, &surface->current.subsurfaces_below, current.link) {
|
wl_list_for_each(subsurface, &surface->current.subsurfaces_below, current.link) {
|
||||||
subsurface_parent_commit(subsurface, false);
|
subsurface_parent_commit(subsurface, false);
|
||||||
|
|
Loading…
Reference in a new issue