Evaluate HdyApplicationWindow for main window
So, libhandy has HdyWindow
and HdyApplicationWindow
now. They basically have:
- No separate titlebar, so headerbar is just a widget in the regular hierarchy, is still there in fullscreen etc
- Round bottom corners
Quite a lot of GNOME are adopting it, and elementary will too in 6.0. Even in Epiphany itself we're using it in the history and preferences dialogs now :)
Currently we're using DzlApplicationWindow
which allows to do fullscreen handling. This is nice, but really the only reason this is needed is because window titlebar disappears in fullscreen otherwise. With the libhandy windows, it's not really an issue at all.
Now, since headerbar is still there in fullscreen, it needs a widget that is basically like GtkBox in windowed mode and GtkOverlay in fullscreen. It is being worked on by @haecker-felix, based on a similar widget I implemented for Games previously for exactly this purpose, so should not be a problem. :)
So, what do we get with this:
- If in future we have a separate tab bar, we can show and hide it in fullscreen. Right now we can't because
DzlApplicationWindow
specifically supports showing headerbar in fullscreen and nothing else. - Simpler layout for the mobile tab page, although it's a moot point if it's going away in future in favor of a bottom sheet
- With bottom sheet, it allows to shade headerbar as well and avoid this, because it's clipped away by the window:
(which is already there with the mobile tabs btw)
- Bottom round corners, like on macOS, in e.g. Clocks or Games nightly, or elementary apps like Terminal in 6.0, or the history dialog.
Now, the problem with this is since the WebKitWebView intersects window corners, it is clipped too and so if it's using AC mode, GTK's fast path for blitting the GL content with GL instead of Cairo is not triggered if it's updating anything near the corners.
This may in theory regress performance, but we already have an overlay that is shown when we're hovering an overlay. On my computer there's not really any difference, but I obviously can't check on other computers, so bringing it up anyway.
So if we do this, the performance will always be as if we're hovering an URL right now :)
On mobile, or when the window is maximized or fullscreened (or if you're using a theme with border-radius: 0 on the window), it's not an issue because we don't clip corners in that case, it's only for floating window.
To be clear, this isn't 3.38.0 material, there's certainly no time for that.
Note that GTK4 will support it natively, both headerbar-in-window and corners.