exposay: centralize exposay's surfaces in their own square
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>
This commit is contained in:
parent
048c628139
commit
55b4b47ec1
@ -348,6 +348,13 @@ exposay_layout(struct desktop_shell *shell, struct shell_output *shell_output)
|
||||
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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user