From: Michael Stapelberg Date: Mon, 21 Nov 2011 23:04:49 +0000 (+0000) Subject: Bugfix: fix fullscreen with floating windows X-Git-Tag: 4.1.1~33^2 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=61b8a62132bf07682b79902f5ea9f712bca000c9;p=i3%2Fi3 Bugfix: fix fullscreen with floating windows Fixes: #564 --- diff --git a/src/render.c b/src/render.c index d85d16a7..2905356c 100644 --- a/src/render.c +++ b/src/render.c @@ -236,6 +236,27 @@ void render_con(Con *con, bool render_fullscreen) { Con *content = output_get_content(output); Con *workspace = TAILQ_FIRST(&(content->focus_head)); + /* Check for (floating!) fullscreen nodes */ + /* XXX: This code duplication is unfortunate. Keep in mind to fix + * this when we clean up the whole render.c */ + Con *fullscreen = NULL; + fullscreen = con_get_fullscreen_con(workspace, CF_OUTPUT); + if (fullscreen) { + /* Either the fullscreen window is inside the floating + * container, then we need to render and raise it now… */ + if (con_inside_floating(fullscreen)) { + fullscreen->rect = output->rect; + x_raise_con(fullscreen); + render_con(fullscreen, true); + continue; + } else { + /* …or it’s a tiling window, in which case the floating + * windows should not overlap it, so we skip rendering this + * output. */ + continue; + } + } + Con *child; TAILQ_FOREACH(child, &(workspace->floating_head), floating_windows) { DLOG("floating child at (%d,%d) with %d x %d\n", child->rect.x, child->rect.y, child->rect.width, child->rect.height);