From 1afa20a3100fe9b8b749877f3affe92d9f5aa48d Mon Sep 17 00:00:00 2001 From: Dudemanguy Date: Tue, 6 Jul 2021 08:29:45 -0500 Subject: [PATCH] container: ignore borders in fullscreen windows When setting the geometry from content for floating windows, the coordinates for borders are normally taken into account. However in the case of a floating fullscreen window, we should not be doing this. Since the content of the container takes the space of the entire output, this causes the calculated borders to neccesarily be outside of the output. This later causes a problem when sending surface entrance events since in a multi-monitor setup, the border coordinates will overlap with another output despite the surface not actually being on that output at all. The fix is to just ignore border coordinates for a floating fullscreen container since fullscreen, of course, does not actually have any borders. Fixes #6080. --- sway/tree/container.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sway/tree/container.c b/sway/tree/container.c index b928d069f..85c422ee6 100644 --- a/sway/tree/container.c +++ b/sway/tree/container.c @@ -894,7 +894,7 @@ void container_set_geometry_from_content(struct sway_container *con) { size_t border_width = 0; size_t top = 0; - if (con->pending.border != B_CSD) { + if (con->pending.border != B_CSD && !con->pending.fullscreen_mode) { border_width = con->pending.border_thickness * (con->pending.border != B_NONE); top = con->pending.border == B_NORMAL ? container_titlebar_height() : border_width;