Deduplicate subsurface and popup code
Layersurfaces and views had their own implementations for popups and subsurfaces although they do the same thing. This MR introduces a common interface for that allows PhocViewChild
s to have either a layersurface or view as parent allowing us to use the same code for both. Given the noisiness of GObject interfaces the diffstat turns out nicely and we no longer have to fix bugs in two places. As a side effect the layer-shell code now only deals with arranging layers and leaves the surface handling to LayerSurface as it should be.
This goes on top of !625 (merged) and I mostly put it here so one can see where that MR is heading.
Left to do:
-
Allow for different popup unconstrain functions. This can either be done by making PhocPopup
a derivable type and overriding the unconstrain function or by adding anothervfunc
to the root interface. For testing this doesn't matter much atm -
Rename PhocViewChild
toPhocChild
as the parent isn't necessarily a view anymore. I'll do that close to merge as otherwise rebasing just becomes troublesome -
Drop damage_whole
fromPhocChildRoot
API once !628 (merged) lands
Some of the clean up can be pulled out for upfront merging in smaller chunks.
Edited by Guido Günther