diff options
author | Philippe Coval <philippe.coval@open.eurogiciel.org> | 2014-06-10 15:17:46 +0200 |
---|---|---|
committer | Stephane Desneux <stephane.desneux@open.eurogiciel.org> | 2014-06-13 16:34:07 +0200 |
commit | 84c513a60eb26c54514af0c8b9c92444f3b36bf7 (patch) | |
tree | 1c2f3d69009fb00aa834107fd986a51097d0fdf7 | |
parent | c07c6eef5169a0e75c4e9c062f3aaa744fce5880 (diff) | |
download | weston-84c513a60eb26c54514af0c8b9c92444f3b36bf7.tar.gz weston-84c513a60eb26c54514af0c8b9c92444f3b36bf7.tar.bz2 weston-84c513a60eb26c54514af0c8b9c92444f3b36bf7.zip |
downstream: shell: make panel optional panel false in weston.ini
Adapted from Manuel Bachmann <manuel.bachmann@open.eurogiciel.org> hack
Change-Id: I110503d03a6ac495c3394cec99ab841ce27c02c9
Signed-off-by: Philippe Coval <philippe.coval@open.eurogiciel.org>
-rw-r--r-- | clients/desktop-shell.c | 30 |
1 files changed, 18 insertions, 12 deletions
diff --git a/clients/desktop-shell.c b/clients/desktop-shell.c index e121cc73..161d3ac6 100644 --- a/clients/desktop-shell.c +++ b/clients/desktop-shell.c @@ -62,6 +62,7 @@ struct desktop { struct weston_config *config; int locking; + int panel; enum cursor_type grab_cursor; @@ -171,8 +172,10 @@ is_desktop_painted(struct desktop *desktop) struct output *output; wl_list_for_each(output, &desktop->outputs, link) { - if (output->panel && !output->panel->painted) - return 0; + if (desktop->panel) { + if (output->panel && !output->panel->painted) + return 0; + } if (output->background && !output->background->painted) return 0; } @@ -1130,7 +1133,8 @@ static void 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); @@ -1159,8 +1163,8 @@ output_handle_geometry(void *data, int transform) { 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); } @@ -1186,8 +1190,8 @@ output_handle_scale(void *data, int32_t scale) { 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); } @@ -1202,11 +1206,12 @@ 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(output->panel) { + 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); @@ -1319,6 +1324,7 @@ int main(int argc, char *argv[]) desktop.config = weston_config_parse("weston.ini"); s = weston_config_get_section(desktop.config, "shell", NULL, NULL); weston_config_section_get_bool(s, "locking", &desktop.locking, 1); + weston_config_section_get_bool(s, "panel", &desktop.panel, 1); desktop.display = display_create(&argc, argv); if (desktop.display == NULL) { |