summaryrefslogtreecommitdiffstats
path: root/meta-agl/recipes-graphics/wayland
diff options
context:
space:
mode:
authorManuel Bachmann <mbc@iot.bzh>2015-11-05 12:33:29 +0000
committerGerrit Code Review <gerrit@172.30.200.200>2015-11-06 15:24:18 +0000
commitfa362551def1806d0b1fba133990ad88142d9d1b (patch)
tree40bb14f38c9c056d3944a583d17857b3d1916437 /meta-agl/recipes-graphics/wayland
parent602320cacf1d9edaaf77bf4dcb9d13ea0ea5146d (diff)
Make Weston desktop-shell panel configurable (backport)
The Weston panel is the top bar containing launcher and clock icons. We might want to disable it for demos. This can now be done by adding in "weston.ini" : [shell] panel-location=none This is a backport from upstream Weston : http://cgit.freedesktop.org/wayland/weston/patch/ ?id=e67118c80ad411ac46b7096aae2635510c80ea6d Change-Id: Iaf60f612f8e01e7aa51f8a0558de00f26d36aee8 Signed-off-by: Manuel Bachmann <mbc@iot.bzh>
Diffstat (limited to 'meta-agl/recipes-graphics/wayland')
-rw-r--r--meta-agl/recipes-graphics/wayland/weston/0001-desktop-shell-add-option-to-avoid-creating-the-panel.patch99
-rw-r--r--meta-agl/recipes-graphics/wayland/weston/weston.ini5
-rw-r--r--meta-agl/recipes-graphics/wayland/weston_1.5.0.bbappend1
3 files changed, 105 insertions, 0 deletions
diff --git a/meta-agl/recipes-graphics/wayland/weston/0001-desktop-shell-add-option-to-avoid-creating-the-panel.patch b/meta-agl/recipes-graphics/wayland/weston/0001-desktop-shell-add-option-to-avoid-creating-the-panel.patch
new file mode 100644
index 000000000..5e8c3c9dc
--- /dev/null
+++ b/meta-agl/recipes-graphics/wayland/weston/0001-desktop-shell-add-option-to-avoid-creating-the-panel.patch
@@ -0,0 +1,99 @@
+From e67118c80ad411ac46b7096aae2635510c80ea6d Mon Sep 17 00:00:00 2001
+From: Jonny Lamb <jonny.lamb@collabora.co.uk>
+Date: Tue, 12 Aug 2014 15:07:51 +0200
+Subject: desktop-shell: add option to avoid creating the panel
+
+This option is so we can disable showing any panel at all. The default
+is to continue showing the panel and no example is added to weston.ini
+because it's an uncommon request.
+
+Tested-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
+---
+
+--- a/clients/desktop-shell.c 2015-11-05 11:51:26.272052133 +0000
++++ b/clients/desktop-shell.c 2015-11-05 11:56:19.666887702 +0000
+@@ -1130,7 +1130,8 @@
+ output_destroy(struct output *output)
+ {
+ background_destroy(output->background);
+- panel_destroy(output->panel);
++ if (output->panel)
++ panel_destroy(output->panel);
+ wl_output_destroy(output->output);
+ wl_list_remove(&output->link);
+
+@@ -1160,7 +1161,8 @@
+ {
+ struct output *output = data;
+
+- window_set_buffer_transform(output->panel->window, transform);
++ if (output->panel)
++ window_set_buffer_transform(output->panel->window, transform);
+ window_set_buffer_transform(output->background->window, transform);
+ }
+
+@@ -1187,7 +1189,8 @@
+ {
+ struct output *output = data;
+
+- window_set_buffer_scale(output->panel->window, scale);
++ if (output->panel)
++ window_set_buffer_scale(output->panel->window, scale);
+ window_set_buffer_scale(output->background->window, scale);
+ }
+
+@@ -1198,15 +1201,36 @@
+ output_handle_scale
+ };
+
++static int
++want_panel(struct desktop *desktop)
++{
++ struct weston_config_section *s;
++ char *location = NULL;
++ int ret = 1;
++
++ s = weston_config_get_section(desktop->config, "shell", NULL, NULL);
++ weston_config_section_get_string(s, "panel-location",
++ &location, "top");
++
++ if (strcmp(location, "top") != 0)
++ ret = 0;
++
++ free(location);
++
++ return ret;
++}
++
+ static void
+ output_init(struct output *output, struct desktop *desktop)
+ {
+ struct wl_surface *surface;
+
+- output->panel = panel_create(desktop);
+- surface = window_get_wl_surface(output->panel->window);
+- desktop_shell_set_panel(desktop->shell,
+- output->output, surface);
++ if (want_panel(desktop)) {
++ output->panel = panel_create(desktop);
++ surface = window_get_wl_surface(output->panel->window);
++ desktop_shell_set_panel(desktop->shell,
++ output->output, surface);
++ }
+
+ output->background = background_create(desktop);
+ surface = window_get_wl_surface(output->background->window);
+--- a/man/weston.ini.man 2015-11-05 11:56:36.763111313 +0000
++++ b/man/weston.ini.man 2015-11-05 12:06:57.097226512 +0000
+@@ -186,6 +186,11 @@
+ .fi
+ .RE
+ .TP 7
++.BI "panel-location=" top
++sets the location of the panel (string). Can be
++.B top,
++.B none.
++.TP 7
+ .BI "locking=" true
+ enables screen locking (boolean).
+ .TP 7
diff --git a/meta-agl/recipes-graphics/wayland/weston/weston.ini b/meta-agl/recipes-graphics/wayland/weston/weston.ini
index 3241204b6..b533d8908 100644
--- a/meta-agl/recipes-graphics/wayland/weston/weston.ini
+++ b/meta-agl/recipes-graphics/wayland/weston/weston.ini
@@ -1,2 +1,7 @@
[core]
shell=desktop-shell.so
+
+[shell]
+locking=true
+# Uncomment below to hide panel
+#panel-location=none
diff --git a/meta-agl/recipes-graphics/wayland/weston_1.5.0.bbappend b/meta-agl/recipes-graphics/wayland/weston_1.5.0.bbappend
index fd195e90d..cb8d11ed9 100644
--- a/meta-agl/recipes-graphics/wayland/weston_1.5.0.bbappend
+++ b/meta-agl/recipes-graphics/wayland/weston_1.5.0.bbappend
@@ -1,6 +1,7 @@
FILESEXTRAPATHS_append := ":${THISDIR}/${PN}"
SRC_URI_append = "\
+ file://0001-desktop-shell-add-option-to-avoid-creating-the-panel.patch \
file://weston.service \
file://weston.ini \
"