aboutsummaryrefslogtreecommitdiffstats
path: root/sway/desktop/transaction.c
diff options
context:
space:
mode:
authorLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2018-09-21 23:02:48 +1000
committerLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2018-09-21 23:02:48 +1000
commitae2f53a4773e2310287bc95ea68a2c5e040fbb45 (patch)
tree3d081aa285990f52c0b001e4209f467da66b7780 /sway/desktop/transaction.c
parentUpdate stability notice in README (diff)
downloadsway-ae2f53a4773e2310287bc95ea68a2c5e040fbb45.tar.gz
sway-ae2f53a4773e2310287bc95ea68a2c5e040fbb45.tar.zst
sway-ae2f53a4773e2310287bc95ea68a2c5e040fbb45.zip
Reconfigure xwayland views when repositioned
Fixes #2673.
Diffstat (limited to 'sway/desktop/transaction.c')
-rw-r--r--sway/desktop/transaction.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/sway/desktop/transaction.c b/sway/desktop/transaction.c
index d747e279..797f6b4c 100644
--- a/sway/desktop/transaction.c
+++ b/sway/desktop/transaction.c
@@ -6,6 +6,7 @@
6#include <string.h> 6#include <string.h>
7#include <time.h> 7#include <time.h>
8#include <wlr/types/wlr_buffer.h> 8#include <wlr/types/wlr_buffer.h>
9#include "sway/config.h"
9#include "sway/debug.h" 10#include "sway/debug.h"
10#include "sway/desktop.h" 11#include "sway/desktop.h"
11#include "sway/desktop/idle_inhibit_v1.h" 12#include "sway/desktop/idle_inhibit_v1.h"
@@ -390,6 +391,16 @@ static bool should_configure(struct sway_node *node,
390 } 391 }
391 struct sway_container_state *cstate = &node->sway_container->current; 392 struct sway_container_state *cstate = &node->sway_container->current;
392 struct sway_container_state *istate = instruction->container_state; 393 struct sway_container_state *istate = instruction->container_state;
394#ifdef HAVE_XWAYLAND
395 // Xwayland views are position-aware and need to be reconfigured
396 // when their position changes.
397 if (node->sway_container->view->type == SWAY_VIEW_XWAYLAND) {
398 if (cstate->view_x != istate->view_x ||
399 cstate->view_y != istate->view_y) {
400 return true;
401 }
402 }
403#endif
393 if (cstate->view_width == istate->view_width && 404 if (cstate->view_width == istate->view_width &&
394 cstate->view_height == istate->view_height) { 405 cstate->view_height == istate->view_height) {
395 return false; 406 return false;