aboutsummaryrefslogtreecommitdiff
path: root/rootston/xwayland.c
diff options
context:
space:
mode:
authoremersion <contact@emersion.fr>2018-01-28 10:11:31 +0100
committeremersion <contact@emersion.fr>2018-01-28 10:11:31 +0100
commit63736be2143a1821fe0b378e56c7e70f1f3cafec (patch)
tree86cdddae4c9651a1f1042588c02854636cea2f76 /rootston/xwayland.c
parent861d5bdff2e33e453fdddc26cdeef2233c2f8ea7 (diff)
rootston: fix damage tracking for SSD
Diffstat (limited to 'rootston/xwayland.c')
-rw-r--r--rootston/xwayland.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/rootston/xwayland.c b/rootston/xwayland.c
index c0bc9ae7..a3e12d00 100644
--- a/rootston/xwayland.c
+++ b/rootston/xwayland.c
@@ -209,6 +209,8 @@ static void handle_surface_commit(struct wl_listener *listener, void *data) {
int width = wlr_surface->current->width;
int height = wlr_surface->current->height;
+ view_update_size(view, width, height);
+
double x = view->x;
double y = view->y;
if (view->pending_move_resize.update_x) {
@@ -234,6 +236,8 @@ static void handle_map_notify(struct wl_listener *listener, void *data) {
view->wlr_surface = xsurface->surface;
view->x = xsurface->x;
view->y = xsurface->y;
+ view->width = xsurface->surface->current->width;
+ view->height = xsurface->surface->current->height;
wl_list_insert(&desktop->views, &view->link);
struct wlr_subsurface *subsurface;
@@ -264,6 +268,7 @@ static void handle_unmap_notify(struct wl_listener *listener, void *data) {
}
view->wlr_surface = NULL;
+ view->width = view->height = 0;
wl_list_remove(&view->link);
}
@@ -314,6 +319,8 @@ void handle_xwayland_surface(struct wl_listener *listener, void *data) {
view->type = ROOTS_XWAYLAND_VIEW;
view->x = (double)surface->x;
view->y = (double)surface->y;
+ view->width = surface->surface->current->width;
+ view->height = surface->surface->current->height;
view->xwayland_surface = surface;
view->roots_xwayland_surface = roots_surface;