From 421fb312b5a4a6555e408115faae958aeddac793 Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Sun, 20 Jan 2008 17:10:12 +0100 Subject: [PATCH] raise floatings windows on arrange if needed --- layout.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/layout.c b/layout.c index 17793ae25..63cd57e3f 100644 --- a/layout.c +++ b/layout.c @@ -40,6 +40,16 @@ extern AwesomeConf globalconf; #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 * \param screen the screen to arrange */ @@ -62,12 +72,17 @@ arrange(int screen) } curtags[0]->layout->arrange(screen); + for(c = globalconf.clients; c; c = c->next) if(c->newcomer && client_isvisible(c, screen)) { c->newcomer = False; client_unban(c); } + + if(!globalconf.screens[screen].allow_lower_floats) + layout_raise_floatings(screen); + c = focus_get_current_client(screen); focus(c, True, screen); if(c && XQueryPointer(globalconf.display, RootWindow(globalconf.display, get_phys_screen(screen)),