magnifier: use all space if no other window
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
6fc677c441
commit
9161fd0b2c
|
@ -48,22 +48,27 @@ layout_magnifier(int screen)
|
||||||
if(!focus)
|
if(!focus)
|
||||||
goto bailout;
|
goto bailout;
|
||||||
|
|
||||||
geometry.width = area.width * sqrt(curtags[0]->mwfact);
|
|
||||||
geometry.height = area.height * sqrt(curtags[0]->mwfact);
|
|
||||||
geometry.x = area.x + (area.width - geometry.width) / 2;
|
|
||||||
geometry.y = area.y + (area.height - geometry.height) / 2;
|
|
||||||
client_resize(focus, geometry, focus->honorsizehints);
|
|
||||||
client_raise(focus);
|
|
||||||
|
|
||||||
for(c = client_list_prev_cycle(&globalconf.clients, focus);
|
for(c = client_list_prev_cycle(&globalconf.clients, focus);
|
||||||
c && c != focus;
|
c && c != focus;
|
||||||
c = client_list_prev_cycle(&globalconf.clients, c))
|
c = client_list_prev_cycle(&globalconf.clients, c))
|
||||||
if(IS_TILED(c, screen) && c != focus)
|
if(IS_TILED(c, screen) && c != focus)
|
||||||
n++;
|
n++;
|
||||||
|
|
||||||
|
if(n)
|
||||||
|
{
|
||||||
|
geometry.width = area.width * sqrt(curtags[0]->mwfact);
|
||||||
|
geometry.height = area.height * sqrt(curtags[0]->mwfact);
|
||||||
|
geometry.x = area.x + (area.width - geometry.width) / 2;
|
||||||
|
geometry.y = area.y + (area.height - geometry.height) / 2;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
/* No other clients. */
|
/* No other clients. */
|
||||||
if(!n)
|
geometry = area;
|
||||||
goto bailout;
|
goto bailout;
|
||||||
|
}
|
||||||
|
client_resize(focus, geometry, focus->honorsizehints);
|
||||||
|
client_raise(focus);
|
||||||
|
|
||||||
geometry.x = area.x;
|
geometry.x = area.x;
|
||||||
geometry.y = area.y;
|
geometry.y = area.y;
|
||||||
|
|
Loading…
Reference in New Issue