aboutsummaryrefslogtreecommitdiff
path: root/rootston
diff options
context:
space:
mode:
authoremersion <contact@emersion.fr>2017-09-30 16:05:18 +0200
committeremersion <contact@emersion.fr>2017-09-30 16:05:18 +0200
commite19b39b66b303f8dac9bea73993dd5515f2f0805 (patch)
tree243473dcd61c8bdfab485cdacd7602151d16e3cc /rootston
parent40303b7a09e52bffbef1ea9cb8120da85c7d185c (diff)
Add view->resize for xwayland
Diffstat (limited to 'rootston')
-rw-r--r--rootston/xwayland.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/rootston/xwayland.c b/rootston/xwayland.c
index 4e42a925..2f034574 100644
--- a/rootston/xwayland.c
+++ b/rootston/xwayland.c
@@ -9,6 +9,14 @@
#include "rootston/desktop.h"
#include "rootston/server.h"
+static void resize(struct roots_view *view, uint32_t width, uint32_t height) {
+ assert(view->type == ROOTS_XWAYLAND_VIEW);
+ struct wlr_xwayland_surface *xwayland_surface = view->xwayland_surface;
+ xwayland_surface->width = width;
+ xwayland_surface->height = height;
+ wlr_xwayland_surface_configure(view->desktop->xwayland, xwayland_surface);
+}
+
static void handle_destroy(struct wl_listener *listener, void *data) {
struct roots_xwayland_surface *roots_surface =
wl_container_of(listener, roots_surface, destroy);
@@ -75,6 +83,7 @@ void handle_xwayland_surface(struct wl_listener *listener, void *data) {
view->wlr_surface = surface->surface;
view->desktop = desktop;
view->activate = activate;
+ view->resize = resize;
roots_surface->view = view;
list_add(desktop->views, view);
}