summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeandro Ribeiro <leandrohr@riseup.net>2020-01-25 17:49:07 -0300
committerDaniel Stone <daniels@collabora.com>2020-08-26 14:10:50 +0000
commit2ac73a8b535f1a5d5c024935d37ad8eb06db6d2e (patch)
tree58c58f67d4229685b112e4bcb274a5e7285d18f8
parent82b4d4294319075938ad5cdfedaa19ccc57aa9ec (diff)
downloadweston-2ac73a8b535f1a5d5c024935d37ad8eb06db6d2e.tar.gz
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>
-rw-r--r--desktop-shell/exposay.c13
-rw-r--r--desktop-shell/shell.h3
2 files changed, 3 insertions, 13 deletions
diff --git a/desktop-shell/exposay.c b/desktop-shell/exposay.c
index 06b07ef1..7e9a324c 100644
--- a/desktop-shell/exposay.c
+++ b/desktop-shell/exposay.c
@@ -216,11 +216,10 @@ static void
exposay_surface_and_inner_pad_size(pixman_rectangle32_t exposay_area, struct exposay_output *eoutput)
{
if (exposay_area.height < exposay_area.width)
- eoutput->surface_size =
- (exposay_area.height - (eoutput->vpadding_outer * 2)) / eoutput->grid_size;
+ eoutput->surface_size = exposay_area.height / eoutput->grid_size;
else
- eoutput->surface_size =
- (exposay_area.width - (eoutput->hpadding_outer * 2)) / eoutput->grid_size;
+ eoutput->surface_size = exposay_area.width / eoutput->grid_size;
+
eoutput->padding_inner = eoutput->surface_size / 10;
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) {
eoutput->grid_size = 0;
- eoutput->hpadding_outer = 0;
- eoutput->vpadding_outer = 0;
eoutput->padding_inner = 0;
eoutput->surface_size = 0;
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)
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 */
exposay_surface_and_inner_pad_size(exposay_area, eoutput);
diff --git a/desktop-shell/shell.h b/desktop-shell/shell.h
index 6f72b357..9f0b6abe 100644
--- a/desktop-shell/shell.h
+++ b/desktop-shell/shell.h
@@ -62,9 +62,6 @@ struct exposay_output {
int num_surfaces;
int grid_size;
int surface_size;
-
- int hpadding_outer;
- int vpadding_outer;
int padding_inner;
};