summaryrefslogtreecommitdiffstats
path: root/sway/desktop/xdg_shell_v6.c
diff options
context:
space:
mode:
Diffstat (limited to 'sway/desktop/xdg_shell_v6.c')
-rw-r--r--sway/desktop/xdg_shell_v6.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/sway/desktop/xdg_shell_v6.c b/sway/desktop/xdg_shell_v6.c
index 2545d1a6..37e39f37 100644
--- a/sway/desktop/xdg_shell_v6.c
+++ b/sway/desktop/xdg_shell_v6.c
@@ -37,6 +37,14 @@ static void set_size(struct sway_view *view, int width, int height) {
37 wlr_xdg_toplevel_v6_set_size(view->wlr_xdg_surface_v6, width, height); 37 wlr_xdg_toplevel_v6_set_size(view->wlr_xdg_surface_v6, width, height);
38} 38}
39 39
40static void set_position(struct sway_view *view, double ox, double oy) {
41 if (!assert_xdg(view)) {
42 return;
43 }
44 view->swayc->x = ox;
45 view->swayc->y = oy;
46}
47
40static void handle_commit(struct wl_listener *listener, void *data) { 48static void handle_commit(struct wl_listener *listener, void *data) {
41 struct sway_xdg_surface_v6 *sway_surface = 49 struct sway_xdg_surface_v6 *sway_surface =
42 wl_container_of(listener, sway_surface, commit); 50 wl_container_of(listener, sway_surface, commit);
@@ -87,6 +95,7 @@ void handle_xdg_shell_v6_surface(struct wl_listener *listener, void *data) {
87 sway_view->type = SWAY_XDG_SHELL_V6_VIEW; 95 sway_view->type = SWAY_XDG_SHELL_V6_VIEW;
88 sway_view->iface.get_prop = get_prop; 96 sway_view->iface.get_prop = get_prop;
89 sway_view->iface.set_size = set_size; 97 sway_view->iface.set_size = set_size;
98 sway_view->iface.set_position = set_position;
90 sway_view->wlr_xdg_surface_v6 = xdg_surface; 99 sway_view->wlr_xdg_surface_v6 = xdg_surface;
91 sway_view->sway_xdg_surface_v6 = sway_surface; 100 sway_view->sway_xdg_surface_v6 = sway_surface;
92 sway_view->surface = xdg_surface->surface; 101 sway_view->surface = xdg_surface->surface;