[placement] Smart pl. only use visible floating windows

Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Julien Danjou 2008-04-03 09:04:57 +02:00
parent e3b057cf21
commit c45841921f
1 changed files with 6 additions and 1 deletions

View File

@ -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;