Skip to content

subsurface: don't forget to repaint after the first sub-surface commit

Michael Olbrich requested to merge mol/weston:subsurface into main

This was fixed in a very similar way in the past in eb3cf220 but was lost again in f8486c33.

As described in the original fix, if a client does this:

  1. create a main window and map it
  2. create a wl_surface, and make it a sub-surface of the main window
  3. set the sub-surface to desync
  4. commit content to the sub-surface to map it

Then step 4 should cause the sub-surface to become mapped. However, Weston fails to schedule a repaint in that case, so the sub-surface will not appear until something else causes a repaint on that output, e.g. the main window.

To avoid this, inherit the output_mask from the main surface here. With this, the commit will trigger a repaint for all outputs where the main surface is visible. This repaint will then call weston_view_update_transform() and update the output_mask correctly.

Merge request reports