diff options
Diffstat (limited to 'sway/tree/container.c')
-rw-r--r-- | sway/tree/container.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/sway/tree/container.c b/sway/tree/container.c index 31ec2ce5..82f68519 100644 --- a/sway/tree/container.c +++ b/sway/tree/container.c | |||
@@ -259,7 +259,6 @@ swayc_t *swayc_at(swayc_t *parent, double lx, double ly, | |||
259 | int width = swayc->sway_view->surface->current->width; | 259 | int width = swayc->sway_view->surface->current->width; |
260 | int height = swayc->sway_view->surface->current->height; | 260 | int height = swayc->sway_view->surface->current->height; |
261 | 261 | ||
262 | // TODO popups and subsurfaces | ||
263 | switch (sview->type) { | 262 | switch (sview->type) { |
264 | case SWAY_WL_SHELL_VIEW: | 263 | case SWAY_WL_SHELL_VIEW: |
265 | break; | 264 | break; |
@@ -268,6 +267,20 @@ swayc_t *swayc_at(swayc_t *parent, double lx, double ly, | |||
268 | // coordinate of the top left corner of the window geometry | 267 | // coordinate of the top left corner of the window geometry |
269 | view_sx += sview->wlr_xdg_surface_v6->geometry->x; | 268 | view_sx += sview->wlr_xdg_surface_v6->geometry->x; |
270 | view_sy += sview->wlr_xdg_surface_v6->geometry->y; | 269 | view_sy += sview->wlr_xdg_surface_v6->geometry->y; |
270 | |||
271 | // check for popups | ||
272 | double popup_sx, popup_sy; | ||
273 | struct wlr_xdg_surface_v6 *popup = | ||
274 | wlr_xdg_surface_v6_popup_at(sview->wlr_xdg_surface_v6, | ||
275 | view_sx, view_sy, &popup_sx, &popup_sy); | ||
276 | |||
277 | if (popup) { | ||
278 | *sx = view_sx - popup_sx; | ||
279 | *sy = view_sy - popup_sy; | ||
280 | *surface = popup->surface; | ||
281 | list_free(queue); | ||
282 | return swayc; | ||
283 | } | ||
271 | break; | 284 | break; |
272 | case SWAY_XWAYLAND_VIEW: | 285 | case SWAY_XWAYLAND_VIEW: |
273 | break; | 286 | break; |