From 9da295c11f90dcfbf254ccf23b9124c87ccd8ddf Mon Sep 17 00:00:00 2001 From: Alexander Orzechowski Date: Wed, 22 Nov 2023 15:11:12 -0500 Subject: scene_graph: Implement toplevel clipping --- sway/desktop/transaction.c | 2 +- sway/desktop/xdg_shell.c | 4 ++-- sway/desktop/xwayland.c | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'sway/desktop') diff --git a/sway/desktop/transaction.c b/sway/desktop/transaction.c index 0755c8a0..980e839e 100644 --- a/sway/desktop/transaction.c +++ b/sway/desktop/transaction.c @@ -248,7 +248,7 @@ static void apply_container_state(struct sway_container *container, // the container. This is important for fullscreen views which // refuse to resize to the size of the output. if (view->surface) { - view_center_surface(view); + view_center_and_clip_surface(view); } } } diff --git a/sway/desktop/xdg_shell.c b/sway/desktop/xdg_shell.c index 48b7b4c7..7cdd97c8 100644 --- a/sway/desktop/xdg_shell.c +++ b/sway/desktop/xdg_shell.c @@ -306,9 +306,9 @@ static void handle_commit(struct wl_listener *listener, void *data) { view->geometry.height); } transaction_commit_dirty_client(); - } else { - view_center_surface(view); } + + view_center_and_clip_surface(view); } if (view->container->node.instruction) { diff --git a/sway/desktop/xwayland.c b/sway/desktop/xwayland.c index e0c80c07..9f3f4d5f 100644 --- a/sway/desktop/xwayland.c +++ b/sway/desktop/xwayland.c @@ -436,9 +436,9 @@ static void handle_commit(struct wl_listener *listener, void *data) { if (container_is_floating(view->container)) { view_update_size(view); transaction_commit_dirty_client(); - } else { - view_center_surface(view); } + + view_center_and_clip_surface(view); } if (view->container->node.instruction) { -- cgit v1.2.3