summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Drew DeVault <sir@cmpwn.com>2018-07-06 12:14:26 -0700
committerLibravatar GitHub <noreply@github.com>2018-07-06 12:14:26 -0700
commitfc4ed6f037f28102921492ee0b0457771defa80f (patch)
tree1c5b21dbce5ac24a7ab3d3b9f67482c69838cef5
parentMerge pull request #2206 from martinetd/leaks (diff)
parentMake view_update_* update live props as well (diff)
downloadsway-fc4ed6f037f28102921492ee0b0457771defa80f.tar.gz
sway-fc4ed6f037f28102921492ee0b0457771defa80f.tar.zst
sway-fc4ed6f037f28102921492ee0b0457771defa80f.zip
Merge pull request #2196 from emersion/xwayland-floating-resize
Fix xwayland floating views unclickable
-rw-r--r--sway/desktop/xwayland.c3
-rw-r--r--sway/tree/view.c4
2 files changed, 7 insertions, 0 deletions
diff --git a/sway/desktop/xwayland.c b/sway/desktop/xwayland.c
index 0669a485..b2874cfe 100644
--- a/sway/desktop/xwayland.c
+++ b/sway/desktop/xwayland.c
@@ -283,7 +283,10 @@ static void handle_commit(struct wl_listener *listener, void *data) {
283 if (view->swayc->instructions->length) { 283 if (view->swayc->instructions->length) {
284 transaction_notify_view_ready_by_size(view, 284 transaction_notify_view_ready_by_size(view,
285 surface_state->width, surface_state->height); 285 surface_state->width, surface_state->height);
286 } else if (container_is_floating(view->swayc)) {
287 view_update_size(view, surface_state->width, surface_state->height);
286 } 288 }
289
287 view_damage_from(view); 290 view_damage_from(view);
288} 291}
289 292
diff --git a/sway/tree/view.c b/sway/tree/view.c
index bca8ef8a..e46cb327 100644
--- a/sway/tree/view.c
+++ b/sway/tree/view.c
@@ -574,6 +574,8 @@ void view_update_position(struct sway_view *view, double lx, double ly) {
574 container_damage_whole(view->swayc); 574 container_damage_whole(view->swayc);
575 view->x = lx; 575 view->x = lx;
576 view->y = ly; 576 view->y = ly;
577 view->swayc->current.view_x = lx;
578 view->swayc->current.view_y = ly;
577 if (container_is_floating(view->swayc)) { 579 if (container_is_floating(view->swayc)) {
578 container_set_geometry_from_floating_view(view->swayc); 580 container_set_geometry_from_floating_view(view->swayc);
579 } 581 }
@@ -587,6 +589,8 @@ void view_update_size(struct sway_view *view, int width, int height) {
587 container_damage_whole(view->swayc); 589 container_damage_whole(view->swayc);
588 view->width = width; 590 view->width = width;
589 view->height = height; 591 view->height = height;
592 view->swayc->current.view_width = width;
593 view->swayc->current.view_height = height;
590 if (container_is_floating(view->swayc)) { 594 if (container_is_floating(view->swayc)) {
591 container_set_geometry_from_floating_view(view->swayc); 595 container_set_geometry_from_floating_view(view->swayc);
592 } 596 }