From c45841921f28a6b74e14bd4e97455a6b74551ff2 Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Thu, 3 Apr 2008 09:04:57 +0200 Subject: [PATCH] [placement] Smart pl. only use visible floating windows Signed-off-by: Julien Danjou --- placement.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/placement.c b/placement.c index 1ebb17af..59aec256 100644 --- a/placement.c +++ b/placement.c @@ -23,6 +23,7 @@ #include "screen.h" #include "client.h" #include "titlebar.h" +#include "layouts/floating.h" extern AwesomeConf globalconf; @@ -68,6 +69,7 @@ placement_smart(Client *c) area_t newgeometry = { 0, 0, 0, 0, NULL, NULL }; area_t *screen_geometry, *arealist = NULL, *r; Bool found = False; + Layout *layout; screen_geometry = p_new(area_t, 1); @@ -75,10 +77,13 @@ placement_smart(Client *c) globalconf.screens[c->screen].statusbar, &globalconf.screens[c->screen].padding); + layout = layout_get_current(c->screen); + area_list_push(&arealist, screen_geometry); for(client = globalconf.clients; client; client = client->next) - if(client_isvisible(client, c->screen)) + if((client->isfloating || layout->arrange == layout_floating) + && client_isvisible(client, c->screen)) { newgeometry = client->f_geometry; newgeometry.width += 2 * client->border;