aboutsummaryrefslogtreecommitdiff
path: root/sway/desktop/transaction.c
diff options
context:
space:
mode:
authoremersion <contact@emersion.fr>2018-09-22 10:09:55 +0200
committerGitHub <noreply@github.com>2018-09-22 10:09:55 +0200
commitfe7e66407cd7339eb4a91558d745a9b214e5cea9 (patch)
treef99c3d1d3573797b1a5349f1d47d6e1ac4ac2b6a /sway/desktop/transaction.c
parentd2a0a3cc0a29b3c3145bfedeb00ec68c1b8c5057 (diff)
parentae2f53a4773e2310287bc95ea68a2c5e040fbb45 (diff)
Merge pull request #2678 from RyanDwyer/reconfigure-on-reposition
Reconfigure xwayland views when repositioned
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 @@
#include <string.h>
#include <time.h>
#include <wlr/types/wlr_buffer.h>
+#include "sway/config.h"
#include "sway/debug.h"
#include "sway/desktop.h"
#include "sway/desktop/idle_inhibit_v1.h"
@@ -390,6 +391,16 @@ static bool should_configure(struct sway_node *node,
}
struct sway_container_state *cstate = &node->sway_container->current;
struct sway_container_state *istate = instruction->container_state;
+#ifdef HAVE_XWAYLAND
+ // Xwayland views are position-aware and need to be reconfigured
+ // when their position changes.
+ if (node->sway_container->view->type == SWAY_VIEW_XWAYLAND) {
+ if (cstate->view_x != istate->view_x ||
+ cstate->view_y != istate->view_y) {
+ return true;
+ }
+ }
+#endif
if (cstate->view_width == istate->view_width &&
cstate->view_height == istate->view_height) {
return false;