Investigate MozContainerWayland removal or significant reduction
Categories
(Core :: Widget: Gtk, task, P3)
Tracking
()
People
(Reporter: stransky, Unassigned)
References
(Blocks 1 open bug)
Details
With Wayland rendering implemented by WaylandSurface we may reduce MozContainerWayland usage. WaylandSurface is owned by nsWindow anyway.
| Reporter | ||
Updated•1 year ago
|
Comment 1•1 year ago
|
||
This ticket may be about gtk3 but I can at least give some insight into how this works in gtk4. So I've managed to get fx' gtk3 wayland backend up and running in gtk4 using a simplified mozcontainer. In gtk4 only gtkwindow and gtkpopover got their own gdksurface (gdkwindow in gtk3) and fx' wayland backend needs those for getting a wl_surface to paint on. In gtk4 you just remove the child widget (gtkcontainer) from the mozcontainer and paint straight into the main window instead. This also simplifies event handling a bit when they all just get routed through the main window instead. So simplifying the mozcontainer is very easy to do afaict. Only talking about wayland now as I have no idea of how x11 works.
There is a problem in gtk4 with popups as a stock gtkpopover got default themeing that is a pita to get rid of. A perfect widget to use for popups would probably be a stripped down gtkpopover that is just empty (transparent). But it may be possible with a bit of css magic to just use a stock gtkpopover too. Submitting patches to upstreams gtk4 could possibly also help out with making it a tad easier to use a stock gtkpopover totally transparent, if you don't want to make your own custom popup widget.
| Reporter | ||
Comment 2•1 year ago
|
||
MozContainer/MozContainerWayland was greatly reduced in latest Firefox versions as we're moving slowly to HDR rendering.
From my latest testing we need a child GdkWindow for mShell to correctly paint the window on Wayland, we're getting rendering artifacts related to CSD decorations otherwise (caused by Wayland subsurfaces). There's also question of event handlings between mShell/mContainer.
But I guess that may be fixed somehow. X11 may work as we don't use subsurfaces there.
Comment 3•1 year ago
|
||
(In reply to Martin Stránský [:stransky] (ni? me) from comment #2)
MozContainer/MozContainerWayland was greatly reduced in latest Firefox versions as we're moving slowly to HDR rendering.
I see, I've been out of the loop for a while as I got stuck on porting dnd to gtk4 (quite massive work) but I think I must take a look then.
From my latest testing we need a child GdkWindow for mShell to correctly paint the window on Wayland, we're getting rendering artifacts related to CSD decorations otherwise (caused by Wayland subsurfaces). There's also question of event handlings between mShell/mContainer.
Yeah this may be a problem in gtk4 as gdksurface only exists of types toplevel/popup. So it may not even be technically possible in gtk4 (not easy at least) to keep the child widget layout of the mozcontainer, making your own custom child widget.
Description
•