From b42709525c136a68f08ca7c2bb9dc98e94257ab3 Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Tue, 24 Mar 2020 17:44:17 +0100 Subject: quirks: add KDE quirk: surface must be damaged *after* being attached KDE resets all surface damage when a buffer is attached. Add a quirk that adds a full-buffer damage to the surface. This quirk is intended to be called after attaching a buffer to a surface. --- quirks.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'quirks.h') diff --git a/quirks.h b/quirks.h index 7b6ab4f8..583c0c9f 100644 --- a/quirks.h +++ b/quirks.h @@ -4,9 +4,28 @@ #include "terminal.h" +/* + * On weston (8.0), synchronized subsurfaces aren't updated correctly. + + * They appear to render once, but after that, updates are + * sporadic. Sometimes they update, most of the time they don't. + * + * Adding explicit parent surface commits right after the subsurface + * commit doesn't help (and would be useless anyway, since it would + * defeat the purpose of having the subsurface synchronized in the + * first place). + */ void quirk_weston_subsurface_desync_on(struct wl_subsurface *sub); void quirk_weston_subsurface_desync_off(struct wl_subsurface *sub); /* Shortcuts to call desync_{on,off} on all CSD subsurfaces */ void quirk_weston_csd_on(struct terminal *term); void quirk_weston_csd_off(struct terminal *term); + +/* + * KDE discards all previous damage when a buffer is attached to a + * surface. Thus, if you have recorded damage before you call + * wl_surface_attach(), call this function to record a full buffer + * damage. + */ +void quirk_kde_damage_before_attach(struct wl_surface *surface); -- cgit v1.3