[PATCH] desktop-shell: move panel_add_clock call to panel_create function
Kristian Høgsberg
hoegsberg at gmail.com
Mon Jun 11 06:38:15 PDT 2012
On Sat, Jun 09, 2012 at 08:33:29PM +0200, Rafal Mielniczuk wrote:
> Putting panel_add_clock in launcher_section_done handler
> will cause clock to be created multiple times with every launcher.
> Fix is to move the call to panel_create function.
Oops, I should have caught that, thanks for fixing.
Kristian
> ---
> clients/desktop-shell.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/clients/desktop-shell.c b/clients/desktop-shell.c
> index ae8e5f0..75fb83f 100644
> --- a/clients/desktop-shell.c
> +++ b/clients/desktop-shell.c
> @@ -485,6 +485,8 @@ panel_create(struct display *display)
> widget_set_redraw_handler(panel->widget, panel_redraw_handler);
> widget_set_resize_handler(panel->widget, panel_resize_handler);
> widget_set_button_handler(panel->widget, panel_button_handler);
> +
> + panel_add_clock(panel);
>
> return panel;
> }
> @@ -895,7 +897,6 @@ launcher_section_done(void *data)
> wl_list_for_each(output, &desktop->outputs, link) {
> panel_add_launcher(output->panel,
> key_launcher_icon, key_launcher_path);
> - panel_add_clock(output->panel);
> }
>
> free(key_launcher_icon);
> --
> 1.7.10.4
>
> _______________________________________________
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/wayland-devel
More information about the wayland-devel
mailing list