raise floatings windows on arrange if needed

This commit is contained in:
Julien Danjou 2008-01-20 17:10:12 +01:00
parent 97f08901d6
commit 421fb312b5

View file

@ -40,6 +40,16 @@ extern AwesomeConf globalconf;
#include "layoutgen.h" #include "layoutgen.h"
static void
layout_raise_floatings(int screen)
{
Client *c;
for(c = globalconf.clients; c; c = c->next)
if(c->isfloating && client_isvisible(c, screen))
XRaiseWindow(globalconf.display, c->win);
}
/** Arrange windows following current selected layout /** Arrange windows following current selected layout
* \param screen the screen to arrange * \param screen the screen to arrange
*/ */
@ -62,12 +72,17 @@ arrange(int screen)
} }
curtags[0]->layout->arrange(screen); curtags[0]->layout->arrange(screen);
for(c = globalconf.clients; c; c = c->next) for(c = globalconf.clients; c; c = c->next)
if(c->newcomer && client_isvisible(c, screen)) if(c->newcomer && client_isvisible(c, screen))
{ {
c->newcomer = False; c->newcomer = False;
client_unban(c); client_unban(c);
} }
if(!globalconf.screens[screen].allow_lower_floats)
layout_raise_floatings(screen);
c = focus_get_current_client(screen); c = focus_get_current_client(screen);
focus(c, True, screen); focus(c, True, screen);
if(c && XQueryPointer(globalconf.display, RootWindow(globalconf.display, get_phys_screen(screen)), if(c && XQueryPointer(globalconf.display, RootWindow(globalconf.display, get_phys_screen(screen)),