aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sway/commands/move.c3
-rw-r--r--sway/desktop/render.c2
2 files changed, 3 insertions, 2 deletions
diff --git a/sway/commands/move.c b/sway/commands/move.c
index 7b503624..59f1cf78 100644
--- a/sway/commands/move.c
+++ b/sway/commands/move.c
@@ -117,7 +117,8 @@ static void container_move_to_container_from_direction(
struct sway_container *container, struct sway_container *destination,
enum movement_direction move_dir) {
if (destination->view) {
- if (destination->parent == container->parent) {
+ if (destination->parent == container->parent &&
+ destination->workspace == container->workspace) {
wlr_log(WLR_DEBUG, "Swapping siblings");
list_t *siblings = container_get_siblings(container);
int container_index = list_find(siblings, container);
diff --git a/sway/desktop/render.c b/sway/desktop/render.c
index 9d80f3c7..bb3902ec 100644
--- a/sway/desktop/render.c
+++ b/sway/desktop/render.c
@@ -266,7 +266,7 @@ static void render_view(struct sway_output *output, pixman_region32_t *damage,
struct sway_view *view = con->view;
if (view->saved_buffer) {
render_saved_view(view, output, damage, view->container->alpha);
- } else {
+ } else if (view->surface) {
render_view_toplevels(view, output, damage, view->container->alpha);
}