1 From e67118c80ad411ac46b7096aae2635510c80ea6d Mon Sep 17 00:00:00 2001
2 From: Jonny Lamb <jonny.lamb@collabora.co.uk>
3 Date: Tue, 12 Aug 2014 15:07:51 +0200
4 Subject: desktop-shell: add option to avoid creating the panel
6 This option is so we can disable showing any panel at all. The default
7 is to continue showing the panel and no example is added to weston.ini
8 because it's an uncommon request.
10 Tested-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
13 --- a/clients/desktop-shell.c 2015-11-05 11:51:26.272052133 +0000
14 +++ b/clients/desktop-shell.c 2015-11-05 11:56:19.666887702 +0000
16 output_destroy(struct output *output)
18 background_destroy(output->background);
19 - panel_destroy(output->panel);
21 + panel_destroy(output->panel);
22 wl_output_destroy(output->output);
23 wl_list_remove(&output->link);
27 struct output *output = data;
29 - window_set_buffer_transform(output->panel->window, transform);
31 + window_set_buffer_transform(output->panel->window, transform);
32 window_set_buffer_transform(output->background->window, transform);
37 struct output *output = data;
39 - window_set_buffer_scale(output->panel->window, scale);
41 + window_set_buffer_scale(output->panel->window, scale);
42 window_set_buffer_scale(output->background->window, scale);
45 @@ -1198,15 +1201,36 @@
50 +want_panel(struct desktop *desktop)
52 + struct weston_config_section *s;
53 + char *location = NULL;
56 + s = weston_config_get_section(desktop->config, "shell", NULL, NULL);
57 + weston_config_section_get_string(s, "panel-location",
60 + if (strcmp(location, "top") != 0)
69 output_init(struct output *output, struct desktop *desktop)
71 struct wl_surface *surface;
73 - output->panel = panel_create(desktop);
74 - surface = window_get_wl_surface(output->panel->window);
75 - desktop_shell_set_panel(desktop->shell,
76 - output->output, surface);
77 + if (want_panel(desktop)) {
78 + output->panel = panel_create(desktop);
79 + surface = window_get_wl_surface(output->panel->window);
80 + desktop_shell_set_panel(desktop->shell,
81 + output->output, surface);
84 output->background = background_create(desktop);
85 surface = window_get_wl_surface(output->background->window);
86 --- a/man/weston.ini.man 2015-11-05 11:56:36.763111313 +0000
87 +++ b/man/weston.ini.man 2015-11-05 12:06:57.097226512 +0000
92 +.BI "panel-location=" top
93 +sets the location of the panel (string). Can be
98 enables screen locking (boolean).