|
|
@ -41,7 +41,7 @@ static void set_size(struct sway_view *view, int width, int height) {
|
|
|
|
view->sway_xwayland_surface->pending_height = height;
|
|
|
|
view->sway_xwayland_surface->pending_height = height;
|
|
|
|
|
|
|
|
|
|
|
|
struct wlr_xwayland_surface *xsurface = view->wlr_xwayland_surface;
|
|
|
|
struct wlr_xwayland_surface *xsurface = view->wlr_xwayland_surface;
|
|
|
|
wlr_xwayland_surface_configure(xsurface, view->swayc->x, view->swayc->y,
|
|
|
|
wlr_xwayland_surface_configure(xsurface, xsurface->x, xsurface->y,
|
|
|
|
width, height);
|
|
|
|
width, height);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -67,13 +67,10 @@ static void set_position(struct sway_view *view, double ox, double oy) {
|
|
|
|
view->swayc->x = ox;
|
|
|
|
view->swayc->x = ox;
|
|
|
|
view->swayc->y = oy;
|
|
|
|
view->swayc->y = oy;
|
|
|
|
|
|
|
|
|
|
|
|
if (view->width == 0 || view->height == 0) {
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
wlr_xwayland_surface_configure(view->wlr_xwayland_surface,
|
|
|
|
wlr_xwayland_surface_configure(view->wlr_xwayland_surface,
|
|
|
|
ox + loutput->x, oy + loutput->y,
|
|
|
|
ox + loutput->x, oy + loutput->y,
|
|
|
|
view->width, view->height);
|
|
|
|
view->wlr_xwayland_surface->width,
|
|
|
|
|
|
|
|
view->wlr_xwayland_surface->height);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static void set_activated(struct sway_view *view, bool activated) {
|
|
|
|
static void set_activated(struct sway_view *view, bool activated) {
|
|
|
@ -157,7 +154,7 @@ static void handle_map(struct wl_listener *listener, void *data) {
|
|
|
|
view_damage_whole(sway_surface->view);
|
|
|
|
view_damage_whole(sway_surface->view);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static void handle_configure_request(struct wl_listener *listener, void *data) {
|
|
|
|
static void handle_request_configure(struct wl_listener *listener, void *data) {
|
|
|
|
struct sway_xwayland_surface *sway_surface =
|
|
|
|
struct sway_xwayland_surface *sway_surface =
|
|
|
|
wl_container_of(listener, sway_surface, request_configure);
|
|
|
|
wl_container_of(listener, sway_surface, request_configure);
|
|
|
|
struct wlr_xwayland_surface_configure_event *ev = data;
|
|
|
|
struct wlr_xwayland_surface_configure_event *ev = data;
|
|
|
@ -212,7 +209,7 @@ void handle_xwayland_surface(struct wl_listener *listener, void *data) {
|
|
|
|
|
|
|
|
|
|
|
|
wl_signal_add(&xsurface->events.request_configure,
|
|
|
|
wl_signal_add(&xsurface->events.request_configure,
|
|
|
|
&sway_surface->request_configure);
|
|
|
|
&sway_surface->request_configure);
|
|
|
|
sway_surface->request_configure.notify = handle_configure_request;
|
|
|
|
sway_surface->request_configure.notify = handle_request_configure;
|
|
|
|
|
|
|
|
|
|
|
|
wl_signal_add(&xsurface->events.unmap, &sway_surface->unmap);
|
|
|
|
wl_signal_add(&xsurface->events.unmap, &sway_surface->unmap);
|
|
|
|
sway_surface->unmap.notify = handle_unmap;
|
|
|
|
sway_surface->unmap.notify = handle_unmap;
|
|
|
|