diff options
author | 2017-12-12 20:02:01 +0100 | |
---|---|---|
committer | 2017-12-12 20:02:01 +0100 | |
commit | c7abb77f2217cc4d5642ef1650f7fc75e1c1a9a4 (patch) | |
tree | 8118cd69c22ec2545572a8e443080907f087d401 /sway/desktop/xwayland.c | |
parent | Add scale and transform events to sway_output (diff) | |
download | sway-c7abb77f2217cc4d5642ef1650f7fc75e1c1a9a4.tar.gz sway-c7abb77f2217cc4d5642ef1650f7fc75e1c1a9a4.tar.zst sway-c7abb77f2217cc4d5642ef1650f7fc75e1c1a9a4.zip |
Listen to output layout change
Diffstat (limited to 'sway/desktop/xwayland.c')
-rw-r--r-- | sway/desktop/xwayland.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sway/desktop/xwayland.c b/sway/desktop/xwayland.c index 65c7e1ec..e3799d2d 100644 --- a/sway/desktop/xwayland.c +++ b/sway/desktop/xwayland.c | |||
@@ -55,7 +55,7 @@ static void set_position(struct sway_view *view, double ox, double oy) { | |||
55 | if (!sway_assert(root, "output must be within tree to set position")) { | 55 | if (!sway_assert(root, "output must be within tree to set position")) { |
56 | return; | 56 | return; |
57 | } | 57 | } |
58 | struct wlr_output_layout *layout = root->output_layout; | 58 | struct wlr_output_layout *layout = root->sway_root->output_layout; |
59 | struct wlr_output_layout_output *loutput = | 59 | struct wlr_output_layout_output *loutput = |
60 | wlr_output_layout_get(layout, output->sway_output->wlr_output); | 60 | wlr_output_layout_get(layout, output->sway_output->wlr_output); |
61 | if (!sway_assert(loutput, "output must be within layout to set position")) { | 61 | if (!sway_assert(loutput, "output must be within layout to set position")) { |
@@ -147,14 +147,14 @@ void handle_xwayland_surface(struct wl_listener *listener, void *data) { | |||
147 | // TODO remove from the tree when the surface goes away (unmapped) | 147 | // TODO remove from the tree when the surface goes away (unmapped) |
148 | sway_view->surface = xsurface->surface; | 148 | sway_view->surface = xsurface->surface; |
149 | sway_surface->view = sway_view; | 149 | sway_surface->view = sway_view; |
150 | 150 | ||
151 | // TODO: | 151 | // TODO: |
152 | // - Wire up listeners | 152 | // - Wire up listeners |
153 | // - Handle popups | 153 | // - Handle popups |
154 | // - Look up pid and open on appropriate workspace | 154 | // - Look up pid and open on appropriate workspace |
155 | // - Set new view to maximized so it behaves nicely | 155 | // - Set new view to maximized so it behaves nicely |
156 | // - Criteria | 156 | // - Criteria |
157 | 157 | ||
158 | sway_surface->commit.notify = handle_commit; | 158 | sway_surface->commit.notify = handle_commit; |
159 | wl_signal_add(&xsurface->surface->events.commit, &sway_surface->commit); | 159 | wl_signal_add(&xsurface->surface->events.commit, &sway_surface->commit); |
160 | sway_surface->destroy.notify = handle_destroy; | 160 | sway_surface->destroy.notify = handle_destroy; |