We use the surface size of a fullscreen layer to calculate screen size.
But when height is recomputed and given as a percentage, this definition
becomes self-referencing.
Do a quick fix by caching the monitor resolution.
...using zwlr_layer_surface_v1::set_margin. It's only partial because
surface margin has effect only when the the window is located on edge of
the screen, not in center. Also the anchor property is not implemented,
the anchor point is always the edge of the window corresponding to the
location property.
Includes in the rofi code base are a complete mess; there are many
needless includes and many files rely on transitive includes.
I used include-what-you-use tool to find them. There are much more,
I cherry picked only suggestions relevant to the goal - allow building
rofi without XCB dependencies.
This doesn't break X11 support and it can be upstreamed (after rebasing
and removing changes in wayland-stuff).