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
This commit is contained in:
parent
9046d2424a
commit
b637a40df9
|
@ -1653,10 +1653,8 @@ widget_destroy(struct widget *widget)
|
||||||
if (surface->widget == widget && surface->subsurface)
|
if (surface->widget == widget && surface->subsurface)
|
||||||
surface_destroy(widget->surface);
|
surface_destroy(widget->surface);
|
||||||
|
|
||||||
if (widget->tooltip) {
|
if (widget->tooltip)
|
||||||
free(widget->tooltip);
|
widget_destroy_tooltip(widget);
|
||||||
widget->tooltip = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
wl_list_for_each(input, &display->input_list, link) {
|
wl_list_for_each(input, &display->input_list, link) {
|
||||||
if (input->focus_widget == widget)
|
if (input->focus_widget == widget)
|
||||||
|
|
Loading…
Reference in New Issue