Fix input for floating containers

This commit is contained in:
emersion 2018-07-04 09:41:45 +01:00
parent 4afa18a0c0
commit df20ecdf6d
No known key found for this signature in database
GPG key ID: 0FDE7BE0E88F5E48

View file

@ -660,14 +660,10 @@ struct sway_container *floating_container_at(double lx, double ly,
for (int k = 0; k < ws->floating->children->length; ++k) { for (int k = 0; k < ws->floating->children->length; ++k) {
struct sway_container *floater = struct sway_container *floater =
ws->floating->children->items[k]; ws->floating->children->items[k];
struct wlr_box box = { struct sway_container *at =
.x = floater->x, container_at(floater, lx, ly, surface, sx, sy);
.y = floater->y, if (at != NULL) {
.width = floater->width, return at;
.height = floater->height,
};
if (wlr_box_contains_point(&box, lx, ly)) {
return container_at(floater, lx, ly, surface, sx, sy);
} }
} }
} }