[client] wayland: document wlroots viewport handling workaround

Add a comment so we don't forget and remove the "useless" code.
This commit is contained in:
Quantum 2021-08-03 00:11:34 -04:00 committed by Geoffrey McRae
parent c0aec7d8f4
commit a25c93b28e

View file

@ -103,9 +103,13 @@ void waylandEGLSwapBuffers(EGLDisplay display, EGLSurface surface, const struct
{
if (wlWm.viewport)
{
// Clearing the source and destination rectangles should happen in wp_viewport_destroy.
// However, wlroots does not clear the rectangle until fixed in 456c6e22 (2021-08-02).
// This should be kept to work around old versions of wlroots.
wl_fixed_t clear = wl_fixed_from_int(-1);
wp_viewport_set_source(wlWm.viewport, clear, clear, clear, clear);
wp_viewport_set_destination(wlWm.viewport, -1, -1);
wp_viewport_destroy(wlWm.viewport);
wlWm.viewport = NULL;
}