diff options
Diffstat (limited to 'sway/desktop/xwayland.c')
-rw-r--r-- | sway/desktop/xwayland.c | 28 |
1 files changed, 1 insertions, 27 deletions
diff --git a/sway/desktop/xwayland.c b/sway/desktop/xwayland.c index 783868bc..fc488162 100644 --- a/sway/desktop/xwayland.c +++ b/sway/desktop/xwayland.c | |||
@@ -152,9 +152,7 @@ static uint32_t get_int_prop(struct sway_view *view, enum sway_view_prop prop) { | |||
152 | } | 152 | } |
153 | } | 153 | } |
154 | 154 | ||
155 | // The x and y arguments are output-local for tiled views, and layout | 155 | static void configure(struct sway_view *view, double lx, double ly, int width, |
156 | // coordinates for floating views. | ||
157 | static void configure(struct sway_view *view, double x, double y, int width, | ||
158 | int height) { | 156 | int height) { |
159 | struct sway_xwayland_view *xwayland_view = xwayland_view_from_view(view); | 157 | struct sway_xwayland_view *xwayland_view = xwayland_view_from_view(view); |
160 | if (xwayland_view == NULL) { | 158 | if (xwayland_view == NULL) { |
@@ -162,30 +160,6 @@ static void configure(struct sway_view *view, double x, double y, int width, | |||
162 | } | 160 | } |
163 | struct wlr_xwayland_surface *xsurface = view->wlr_xwayland_surface; | 161 | struct wlr_xwayland_surface *xsurface = view->wlr_xwayland_surface; |
164 | 162 | ||
165 | double lx, ly; | ||
166 | if (container_is_floating(view->swayc)) { | ||
167 | lx = x; | ||
168 | ly = y; | ||
169 | } else { | ||
170 | struct sway_container *output = container_parent(view->swayc, C_OUTPUT); | ||
171 | if (!sway_assert(output, "view must be within tree to set position")) { | ||
172 | return; | ||
173 | } | ||
174 | struct sway_container *root = container_parent(output, C_ROOT); | ||
175 | if (!sway_assert(root, "output must be within tree to set position")) { | ||
176 | return; | ||
177 | } | ||
178 | struct wlr_output_layout *layout = root->sway_root->output_layout; | ||
179 | struct wlr_output_layout_output *loutput = | ||
180 | wlr_output_layout_get(layout, output->sway_output->wlr_output); | ||
181 | if (!sway_assert(loutput, | ||
182 | "output must be within layout to set position")) { | ||
183 | return; | ||
184 | } | ||
185 | lx = x + loutput->x; | ||
186 | ly = y + loutput->y; | ||
187 | } | ||
188 | |||
189 | xwayland_view->pending_width = width; | 163 | xwayland_view->pending_width = width; |
190 | xwayland_view->pending_height = height; | 164 | xwayland_view->pending_height = height; |
191 | wlr_xwayland_surface_configure(xsurface, lx, ly, width, height); | 165 | wlr_xwayland_surface_configure(xsurface, lx, ly, width, height); |