From d2a4e377225b33fdcd5a36a33a22d3d39813f9ca Mon Sep 17 00:00:00 2001 From: Tuyen Pham Date: Sat, 17 Jul 2021 11:41:09 +0000 Subject: [PATCH] correct patch --- sway/tree/container.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/sway/tree/container.c b/sway/tree/container.c index 1e84e6034..ae2d405c3 100644 --- a/sway/tree/container.c +++ b/sway/tree/container.c @@ -559,6 +559,7 @@ static void update_title_texture(struct sway_container *con, output->wlr_output->backend); *texture = wlr_texture_from_pixels( renderer, DRM_FORMAT_ARGB8888, stride, width, height, data); + cairo_surface_destroy(surface); g_object_unref(pango); cairo_destroy(cairo); @@ -1036,6 +1037,14 @@ bool container_has_urgent_child(struct sway_container *container) { return container_find_child(container, find_urgent_iterator, NULL); } +static bool find_focused_iterator(struct sway_container *con, void *data) { + return con->current.focused; +} + +bool container_has_focused_child(struct sway_container *container) { + return container_find_child(container, find_focused_iterator, NULL); +} + void container_end_mouse_operation(struct sway_container *container) { struct sway_seat *seat; wl_list_for_each(seat, &server.input->seats, link) {