mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-10 13:29:44 -05:00
subsurface: unlock cached state on commit if desynced
wl_subsurface::set_desync description states: "If cached state exists when
wl_surface.commit is called in desynchronized mode, the pending state is
added to the cached state, and applied as a whole."
This commit reintroduces an implementation of said behavior, previously
removed in 7daf6da9ac05be2cb74c0983e3caee0b21db75d4.
Strictly speaking, this logic isn't fully correct, as the cached state
and the pending state are applied individually instead, if the cached
state isn't locked by anything else. However, the end result is still
the same.
This commit fixes the issue with Firefox permission popups.
(cherry picked from commit 77951968dc)
This commit is contained in:
parent
304c61307a
commit
68c5fa340d
1 changed files with 3 additions and 0 deletions
|
|
@ -534,6 +534,9 @@ static void subsurface_commit(struct wlr_subsurface *subsurface) {
|
||||||
}
|
}
|
||||||
subsurface->has_cache = true;
|
subsurface->has_cache = true;
|
||||||
subsurface->cached_seq = wlr_surface_lock_pending(surface);
|
subsurface->cached_seq = wlr_surface_lock_pending(surface);
|
||||||
|
} else if (subsurface->has_cache) {
|
||||||
|
wlr_surface_unlock_cached(surface, subsurface->cached_seq);
|
||||||
|
subsurface->has_cache = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue