diff options
author | emersion <contact@emersion.fr> | 2018-04-04 15:53:46 -0400 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2018-04-04 22:03:14 -0400 |
commit | 8eff00f72395add1881aa677e3c718c0554cb096 (patch) | |
tree | 803dc03246326c754732f3b8f635d8a67a2a3441 /sway/tree | |
parent | 679c51e4214dda459d73c2074d4e9afdf56ed992 (diff) |
Remove unused SWAY_VIEW_TYPES
Diffstat (limited to 'sway/tree')
-rw-r--r-- | sway/tree/container.c | 47 |
1 files changed, 22 insertions, 25 deletions
diff --git a/sway/tree/container.c b/sway/tree/container.c index 3be08645..1ea10759 100644 --- a/sway/tree/container.c +++ b/sway/tree/container.c @@ -413,31 +413,28 @@ struct sway_container *container_at(struct sway_container *parent, double view_sy = oy - swayc->y; switch (sview->type) { - case SWAY_WL_SHELL_VIEW: - break; - case SWAY_XDG_SHELL_V6_VIEW: - // the top left corner of the sway container is the - // 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; - return swayc; - } - break; - case SWAY_XWAYLAND_VIEW: - break; - default: - break; + case SWAY_VIEW_XWAYLAND: + case SWAY_VIEW_WL_SHELL: + break; + case SWAY_VIEW_XDG_SHELL_V6: + // the top left corner of the sway container is the + // 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; + return swayc; + } + break; } // check for subsurfaces |