diff options
author | emersion <contact@emersion.fr> | 2018-05-13 16:38:56 +0100 |
---|---|---|
committer | emersion <contact@emersion.fr> | 2018-05-13 16:38:56 +0100 |
commit | 88d9d43b367b9b0cb61c4c9fb1619becdb71e9d6 (patch) | |
tree | 20597fec9184cbad25711a0f0cd7c028e99d2e78 /sway/tree/container.c | |
parent | Merge pull request #1960 from RedSoxFan/edge-borders (diff) | |
download | sway-88d9d43b367b9b0cb61c4c9fb1619becdb71e9d6.tar.gz sway-88d9d43b367b9b0cb61c4c9fb1619becdb71e9d6.tar.zst sway-88d9d43b367b9b0cb61c4c9fb1619becdb71e9d6.zip |
Add xdg-shell stable support
Diffstat (limited to 'sway/tree/container.c')
-rw-r--r-- | sway/tree/container.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/sway/tree/container.c b/sway/tree/container.c index fc35a81c..9f7294db 100644 --- a/sway/tree/container.c +++ b/sway/tree/container.c | |||
@@ -7,6 +7,8 @@ | |||
7 | #include <wayland-server.h> | 7 | #include <wayland-server.h> |
8 | #include <wlr/types/wlr_output_layout.h> | 8 | #include <wlr/types/wlr_output_layout.h> |
9 | #include <wlr/types/wlr_wl_shell.h> | 9 | #include <wlr/types/wlr_wl_shell.h> |
10 | #include <wlr/types/wlr_xdg_shell_v6.h> | ||
11 | #include <wlr/types/wlr_xdg_shell.h> | ||
10 | #include "cairo.h" | 12 | #include "cairo.h" |
11 | #include "pango.h" | 13 | #include "pango.h" |
12 | #include "sway/config.h" | 14 | #include "sway/config.h" |
@@ -459,6 +461,16 @@ struct sway_container *container_at(struct sway_container *parent, | |||
459 | sview->wlr_xdg_surface_v6, | 461 | sview->wlr_xdg_surface_v6, |
460 | view_sx, view_sy, &_sx, &_sy); | 462 | view_sx, view_sy, &_sx, &_sy); |
461 | break; | 463 | break; |
464 | case SWAY_VIEW_XDG_SHELL: | ||
465 | // the top left corner of the sway container is the | ||
466 | // coordinate of the top left corner of the window geometry | ||
467 | view_sx += sview->wlr_xdg_surface->geometry.x; | ||
468 | view_sy += sview->wlr_xdg_surface->geometry.y; | ||
469 | |||
470 | _surface = wlr_xdg_surface_surface_at( | ||
471 | sview->wlr_xdg_surface, | ||
472 | view_sx, view_sy, &_sx, &_sy); | ||
473 | break; | ||
462 | } | 474 | } |
463 | if (_surface) { | 475 | if (_surface) { |
464 | *sx = _sx; | 476 | *sx = _sx; |