From: Kristian Høgsberg Date: Fri, 10 Jan 2014 08:27:35 +0000 (-0800) Subject: window: Properly destroy tooltip windows when parent window is destroyed X-Git-Tag: upstream/0.1.8~515 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b637a40df950398cb0b4ab7f77f73fc7e7886fe8;p=profile%2Fivi%2Fweston-ivi-shell.git window: Properly destroy tooltip windows when parent window is destroyed If we destroy a window with an active tooltip, we leave the tooltip hanging around. Call tooltip destructor when destroying a window. This fixes the stuck tooltip observed when unplugging a monitor with an active tooltip on the panel. Closes: https://bugs.freedesktop.org/show_bug.cgi?id=72931 --- diff --git a/clients/window.c b/clients/window.c index 19519b3..d59b9c7 100644 --- a/clients/window.c +++ b/clients/window.c @@ -1653,10 +1653,8 @@ widget_destroy(struct widget *widget) if (surface->widget == widget && surface->subsurface) surface_destroy(widget->surface); - if (widget->tooltip) { - free(widget->tooltip); - widget->tooltip = NULL; - } + if (widget->tooltip) + widget_destroy_tooltip(widget); wl_list_for_each(input, &display->input_list, link) { if (input->focus_widget == widget)