Instead of trying to run `git --rev-parse --is-inside-work-tree`,
check if there's a .git directory under the source directory.
This should fix an issue where we incorrectly decided we where in a
foot git clone when we're just a subdirectory under another
repository.
This implements client side decorations and have been tested on GNOME
and Weston.
They also render correctly in KWin, but cannot be used to move or
resize the window. I believe this is a bug in KWin's handling of
sub-surfaces positioned outside the parent surface. Luckily, KWin uses
server side decorations.
This merge also contains a lot of bug fixes related to resizing and
rendering of sub-surfaces in general (i.e. the scrollback search box).
Handle the CSDs and the search box the same way we handle the main
grid; when we need to redraw them, call
render_refresh_{csd,search}(). This sets a flag that is checked after
each FDM iteration. All actual rendering is done here.
This also ties the commits of the Wayland sub-surfaces to the commit
of the main surface.
* minimize: a downward triangle
* maximize (window): an upward triangle
* maximize (already maximized): a hollow square
* close: a filled square
The glyphs are now rendered using the default background color instead
of hardcoded to black.
Applications may temporarily change the foreground color. Don't use
this when rendering the CSD title bar - use the default
foreground (i.e the default default one, or the one configured by the
user in footrc).
But it *does* include the title bar. This simplifies the 'adjustment'
needed to be done to the configured window size.
It also fixes a number of issues:
* the compositor will now properly snap the window to screen
edges (before, there was an empty space between the edge and the
window - the CSD border).
* This also removes the need for the mutter 'commit' workaround. We
must be doing something right now.
When the seat capabilities change, we used to destroy all pointers and
keyboards, and then re-creating them as necessary.
This caused a crash on mutter - probably because we removed a keyboard
device the compositor had already sent an event for (or was about to).
Now, we only destroy and create devices when it's needed.