Commit "exposay: add margins to centralize exposay" has centralized
the whole exposay, but that's not enough. The internal surfaces of
exposay are not centralized.
Each internal surface of exposay is a square, but most of the windows
are rectangular. Add margin to centralize exposay's surfaces in their
own square.
Signed-off-by: Leandro Ribeiro <leandrohr@riseup.net>
esurface->width = view->surface->width * esurface->scale;
esurface->height = view->surface->height * esurface->scale;
+ /* Surfaces are usually rectangular, but their exposay surfaces
+ * are square. centralize them in their own square */
+ if (esurface->width > esurface->height)
+ esurface->y += (esurface->width - esurface->height) / 2;
+ else
+ esurface->x += (esurface->height - esurface->width) / 2;
+
if (shell->exposay.focus_current == esurface->view)
highlight = esurface;