diff options
| author | Tony Crisci <tony@dubstepdish.com> | 2018-01-14 10:47:19 -0500 | 
|---|---|---|
| committer | Tony Crisci <tony@dubstepdish.com> | 2018-01-14 10:47:19 -0500 | 
| commit | 76ce62919830b2917c696f599e7710ce05d109c0 (patch) | |
| tree | 3bc06a2cafc611dd436ec8a8255452a63ff81cfe /sway/tree/container.c | |
| parent | 4c8c9b29e43668e9076234a7e221b3746012669f (diff) | |
| download | sway-76ce62919830b2917c696f599e7710ce05d109c0.tar.xz | |
xdg-popups
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,  			int width = swayc->sway_view->surface->current->width;  			int height = swayc->sway_view->surface->current->height; -			// TODO popups and subsurfaces  			switch (sview->type) {  				case SWAY_WL_SHELL_VIEW:  					break; @@ -268,6 +267,20 @@ swayc_t *swayc_at(swayc_t *parent, double lx, double ly,  					// coordinate of the top left corner of the window geometry  					view_sx += sview->wlr_xdg_surface_v6->geometry->x;  					view_sy += sview->wlr_xdg_surface_v6->geometry->y; + +					// check for popups +					double popup_sx, popup_sy; +					struct wlr_xdg_surface_v6 *popup = +						wlr_xdg_surface_v6_popup_at(sview->wlr_xdg_surface_v6, +								view_sx, view_sy, &popup_sx, &popup_sy); + +					if (popup) { +						*sx = view_sx - popup_sx; +						*sy = view_sy - popup_sy; +						*surface = popup->surface; +						list_free(queue); +						return swayc; +					}  					break;  				case SWAY_XWAYLAND_VIEW:  					break; | 
