diff options
Diffstat (limited to 'sway/desktop')
-rw-r--r-- | sway/desktop/output.c | 12 | ||||
-rw-r--r-- | sway/desktop/xwayland.c | 6 |
2 files changed, 7 insertions, 11 deletions
diff --git a/sway/desktop/output.c b/sway/desktop/output.c index f44cda1a..bcdaa7d2 100644 --- a/sway/desktop/output.c +++ b/sway/desktop/output.c | |||
@@ -72,8 +72,7 @@ static void output_frame_view(swayc_t *view, void *data) { | |||
72 | } | 72 | } |
73 | 73 | ||
74 | static void output_frame_notify(struct wl_listener *listener, void *data) { | 74 | static void output_frame_notify(struct wl_listener *listener, void *data) { |
75 | struct sway_output *soutput = wl_container_of( | 75 | struct sway_output *soutput = wl_container_of(listener, soutput, frame); |
76 | listener, soutput, frame); | ||
77 | struct wlr_output *wlr_output = data; | 76 | struct wlr_output *wlr_output = data; |
78 | struct sway_server *server = soutput->server; | 77 | struct sway_server *server = soutput->server; |
79 | 78 | ||
@@ -93,20 +92,17 @@ static void output_frame_notify(struct wl_listener *listener, void *data) { | |||
93 | } | 92 | } |
94 | 93 | ||
95 | static void output_resolution_notify(struct wl_listener *listener, void *data) { | 94 | static void output_resolution_notify(struct wl_listener *listener, void *data) { |
96 | struct sway_output *soutput = wl_container_of( | 95 | struct sway_output *soutput = wl_container_of(listener, soutput, resolution); |
97 | listener, soutput, resolution); | ||
98 | arrange_windows(soutput->swayc, -1, -1); | 96 | arrange_windows(soutput->swayc, -1, -1); |
99 | } | 97 | } |
100 | 98 | ||
101 | static void output_scale_notify(struct wl_listener *listener, void *data) { | 99 | static void output_scale_notify(struct wl_listener *listener, void *data) { |
102 | struct sway_output *soutput = wl_container_of( | 100 | struct sway_output *soutput = wl_container_of(listener, soutput, scale); |
103 | listener, soutput, scale); | ||
104 | arrange_windows(soutput->swayc, -1, -1); | 101 | arrange_windows(soutput->swayc, -1, -1); |
105 | } | 102 | } |
106 | 103 | ||
107 | static void output_transform_notify(struct wl_listener *listener, void *data) { | 104 | static void output_transform_notify(struct wl_listener *listener, void *data) { |
108 | struct sway_output *soutput = wl_container_of( | 105 | struct sway_output *soutput = wl_container_of(listener, soutput, transform); |
109 | listener, soutput, transform); | ||
110 | arrange_windows(soutput->swayc, -1, -1); | 106 | arrange_windows(soutput->swayc, -1, -1); |
111 | } | 107 | } |
112 | 108 | ||
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; |