exposay: delete outer padding from struct exposay_output

After some changes in the exposay layout, the outer padding makes
no sense anymore. It was used to avoid the panel to get overlapped
by the exposay surfaces and to keep distance from the borders
of the window.

Currently, the exposay is centralized and the panel cannot get
overlapped. The outer padding just creates unnecessary unused
space, what makes exposay's surfaces smaller.

Delete outer padding from struct exposay_output.

Signed-off-by: Leandro Ribeiro <leandrohr@riseup.net>
dev
Leandro Ribeiro 5 years ago committed by Daniel Stone
parent 82b4d42943
commit 2ac73a8b53
  1. 13
      desktop-shell/exposay.c
  2. 3
      desktop-shell/shell.h

@ -216,11 +216,10 @@ static void
exposay_surface_and_inner_pad_size(pixman_rectangle32_t exposay_area, struct exposay_output *eoutput) exposay_surface_and_inner_pad_size(pixman_rectangle32_t exposay_area, struct exposay_output *eoutput)
{ {
if (exposay_area.height < exposay_area.width) if (exposay_area.height < exposay_area.width)
eoutput->surface_size = eoutput->surface_size = exposay_area.height / eoutput->grid_size;
(exposay_area.height - (eoutput->vpadding_outer * 2)) / eoutput->grid_size;
else else
eoutput->surface_size = eoutput->surface_size = exposay_area.width / eoutput->grid_size;
(exposay_area.width - (eoutput->hpadding_outer * 2)) / eoutput->grid_size;
eoutput->padding_inner = eoutput->surface_size / 10; eoutput->padding_inner = eoutput->surface_size / 10;
eoutput->surface_size -= eoutput->padding_inner; eoutput->surface_size -= eoutput->padding_inner;
@ -277,8 +276,6 @@ exposay_layout(struct desktop_shell *shell, struct shell_output *shell_output)
if (eoutput->num_surfaces == 0) { if (eoutput->num_surfaces == 0) {
eoutput->grid_size = 0; eoutput->grid_size = 0;
eoutput->hpadding_outer = 0;
eoutput->vpadding_outer = 0;
eoutput->padding_inner = 0; eoutput->padding_inner = 0;
eoutput->surface_size = 0; eoutput->surface_size = 0;
return EXPOSAY_LAYOUT_OVERVIEW; return EXPOSAY_LAYOUT_OVERVIEW;
@ -293,10 +290,6 @@ exposay_layout(struct desktop_shell *shell, struct shell_output *shell_output)
if (pow(eoutput->grid_size, 2) != eoutput->num_surfaces) if (pow(eoutput->grid_size, 2) != eoutput->num_surfaces)
eoutput->grid_size++; eoutput->grid_size++;
/* Fixed outer padding of 10% the size of the screen */
eoutput->hpadding_outer = (exposay_area.width / 10);
eoutput->vpadding_outer = (exposay_area.height / 10);
/* Compute each surface size and the inner padding between them */ /* Compute each surface size and the inner padding between them */
exposay_surface_and_inner_pad_size(exposay_area, eoutput); exposay_surface_and_inner_pad_size(exposay_area, eoutput);

@ -62,9 +62,6 @@ struct exposay_output {
int num_surfaces; int num_surfaces;
int grid_size; int grid_size;
int surface_size; int surface_size;
int hpadding_outer;
int vpadding_outer;
int padding_inner; int padding_inner;
}; };

Loading…
Cancel
Save