Layersurface issue with popovers and touch (probably compositor+gtk)
@guido.gunther @sebastian.krzyszkowiak When you have some time, I am seeing some interesting behavior with popover rendering on PhoshLayerSurface. To fully reproduce the issue, both touch and mouse input are needed (an aside: touch input does not rotate with screen on my laptop).
There might actually be a couple of separate issues involved here, but the one I am most interested in is this: during (touch-)events the Gtk rendering seems to think Popovers (subsurfaces) of the LayerSurface are occluded by the LayerSurface (ie stacked below it (compositor issue?), so there is nothing to draw on their intersected region). To make matters more interesting, this seems to only happen with touch events (gtk issue?).
I hope this makes sense. To reproduce (these are very specific, intended to both reproduce exact behavior and isolate the bug(s), please bear with me):
- build raisins/snapshots@745de1cc323a881ccc33374368fb05ded6b5b4ab
- run phoc + phosh session from the console on a touch enabled laptop.
- start a terminal inside this session
- run 'build/src/raisinsboard' inside the terminal (keep terminal window focused for debugging output)
- go to the LatinExt layout by hitting the globe 2 times. This layout has a ton of popups, from memory there are popups under all plain keys except "qwpfxvm".
- long-press a key on the top row with touch, let's take the 't'. A popover should appear. Pan to select favorite t-like character and release.
- this should render correctly and work as expected. Now the spellchecker kicks in and shows suggestions. Note that this is a separate PhoshLayerSurface with the same namespace, anchor, exclusive-zone, layer, etc.
- with the spellchecker present do the EXACT SAME THING (long-press 't' with touch, and pan-left-right)
- the updates to the popover will render poorly (like described above)
- note that popovers on lower rows (which should always render over their own parent surface) never render panning correctly during touch events.
- also note that doing the same operations but with mouse seem to work correctly (a quick aside: after I added g_main_context_iteration() bubbles to handle rendering)
- also note rendering updates to these popovers is completely broken inside a nested (wayland inside wayland) compositor.
I hope this all makes sense (both the issue and the instructions).