desktop-shell: move panel_add_clock call to panel_create function

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.
dev
Rafal Mielniczuk 13 years ago committed by Kristian Høgsberg
parent 6e0a7d82b7
commit b9e513c678
  1. 3
      clients/desktop-shell.c

@ -486,6 +486,8 @@ panel_create(struct display *display)
widget_set_resize_handler(panel->widget, panel_resize_handler); widget_set_resize_handler(panel->widget, panel_resize_handler);
widget_set_button_handler(panel->widget, panel_button_handler); widget_set_button_handler(panel->widget, panel_button_handler);
panel_add_clock(panel);
return panel; return panel;
} }
@ -895,7 +897,6 @@ launcher_section_done(void *data)
wl_list_for_each(output, &desktop->outputs, link) { wl_list_for_each(output, &desktop->outputs, link) {
panel_add_launcher(output->panel, panel_add_launcher(output->panel,
key_launcher_icon, key_launcher_path); key_launcher_icon, key_launcher_path);
panel_add_clock(output->panel);
} }
free(key_launcher_icon); free(key_launcher_icon);

Loading…
Cancel
Save