From 55edbfe73479352cacb4558e77f7467c056809fc Mon Sep 17 00:00:00 2001 From: =?utf8?q?Ingo=20B=C3=BCrk?= Date: Sun, 20 Sep 2015 11:35:26 +0200 Subject: [PATCH] If no output is available, use the root screen geometry to determine the maximum size when checking the size of floating windows. This is necessary during a restart of i3 when restoring floating windows. In this situation, we restore the layout before setting up the RandR outputs which would set the window's size to 0, making it invisible. Thanks to hwangcc23 and spudowiar for reporting. fixes #1910 fixes #1934 --- src/floating.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/floating.c b/src/floating.c index a9da2c70..67c3a1b8 100644 --- a/src/floating.c +++ b/src/floating.c @@ -18,6 +18,9 @@ extern xcb_connection_t *conn; * */ static Rect total_outputs_dimensions(void) { + if (TAILQ_EMPTY(&outputs)) + return (Rect){0, 0, root_screen->width_in_pixels, root_screen->height_in_pixels}; + Output *output; /* Use Rect to encapsulate dimensions, ignoring x/y */ Rect outputs_dimensions = {0, 0, 0, 0}; -- 2.39.5