aboutsummaryrefslogtreecommitdiff
path: root/sway/desktop
diff options
context:
space:
mode:
Diffstat (limited to 'sway/desktop')
-rw-r--r--sway/desktop/render.c11
-rw-r--r--sway/desktop/transaction.c11
2 files changed, 18 insertions, 4 deletions
diff --git a/sway/desktop/render.c b/sway/desktop/render.c
index 1d2f445d..af4e2905 100644
--- a/sway/desktop/render.c
+++ b/sway/desktop/render.c
@@ -914,12 +914,17 @@ void output_render(struct sway_output *output, struct timespec *when,
struct wlr_output *wlr_output = output->wlr_output;
struct wlr_renderer *renderer =
- wlr_backend_get_renderer(wlr_output->backend);
+ wlr_backend_get_renderer(wlr_output->backend);
if (!sway_assert(renderer != NULL,
"expected the output backend to have a renderer")) {
return;
}
+ struct sway_workspace *workspace = output->current.active_workspace;
+ if (workspace == NULL) {
+ return;
+ }
+
wlr_renderer_begin(renderer, wlr_output->width, wlr_output->height);
if (!pixman_region32_not_empty(damage)) {
@@ -935,13 +940,11 @@ void output_render(struct sway_output *output, struct timespec *when,
pixman_region32_union_rect(damage, damage, 0, 0, width, height);
}
- struct sway_workspace *workspace = output->current.active_workspace;
- struct sway_container *fullscreen_con = workspace->current.fullscreen;
-
if (output_has_opaque_overlay_layer_surface(output)) {
goto render_overlay;
}
+ struct sway_container *fullscreen_con = workspace->current.fullscreen;
if (fullscreen_con) {
float clear_color[] = {0.0f, 0.0f, 0.0f, 1.0f};
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;