From 8e3531648b319462f2bb05b1c4ba880e8eb41cf9 Mon Sep 17 00:00:00 2001 From: Marcel Hollerbach Date: Fri, 31 Mar 2017 16:33:05 +0200 Subject: [PATCH] tiling: fix zero sized zone when plugging a screen in and out, there is the case that a zone has a usefull geometry of 0x0, which means all clients on this zone are resized to 0x0. Which leads to a CRIT message in the compositor, which leads (ref commit 5d875e6a3dcd6a045610a6333cad9b6d15ebb2f1) to a abort() which is really really annoying. Give here a short ERR about that case so we are leaving out the compositor, since this really only strikes on tiling, since in normal mode the client just keeps its size. --- src/modules/tiling/e_mod_tiling.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/modules/tiling/e_mod_tiling.c b/src/modules/tiling/e_mod_tiling.c index ddee94705..88b88ba21 100644 --- a/src/modules/tiling/e_mod_tiling.c +++ b/src/modules/tiling/e_mod_tiling.c @@ -476,8 +476,11 @@ _reapply_tree(void) { e_zone_desk_useful_geometry_get(_G.tinfo->desk->zone, _G.tinfo->desk, &zx, &zy, &zw, &zh); - tiling_window_tree_apply(_G.tinfo->tree, zx, zy, zw, zh, - tiling_g.config->window_padding); + if (zw > 0 && zh > 0) + tiling_window_tree_apply(_G.tinfo->tree, zx, zy, zw, zh, + tiling_g.config->window_padding); + else + ERR("The zone desk geomtry was not usefull at all (%d,%d,%d,%d)", zx, zy, zw, zh); } }