mirror of
https://github.com/awesomeWM/awesome
synced 2024-11-17 07:47:41 +01:00
[magnifier] Use mwfact
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
1b41983a6f
commit
a1df77428d
1 changed files with 8 additions and 4 deletions
|
@ -32,6 +32,7 @@ layout_magnifier(int screen)
|
|||
{
|
||||
int n = 0;
|
||||
client_t *c, *focus;
|
||||
tag_t **curtags = tags_get_current(screen);
|
||||
area_t geometry, area = screen_get_area(screen,
|
||||
globalconf.screens[screen].statusbar,
|
||||
&globalconf.screens[screen].padding);
|
||||
|
@ -44,10 +45,10 @@ layout_magnifier(int screen)
|
|||
|
||||
/* No windows is tiled, nothing to do. */
|
||||
if(!focus)
|
||||
return;
|
||||
goto bailout;
|
||||
|
||||
geometry.width = area.width * 0.9;
|
||||
geometry.height = area.height * 0.9;
|
||||
geometry.width = area.width * curtags[0]->mwfact;
|
||||
geometry.height = area.height * 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, globalconf.resize_hints);
|
||||
|
@ -58,7 +59,7 @@ layout_magnifier(int screen)
|
|||
|
||||
/* No other clients. */
|
||||
if(!n)
|
||||
return;
|
||||
goto bailout;
|
||||
|
||||
geometry.x = area.x;
|
||||
geometry.y = area.y;
|
||||
|
@ -75,5 +76,8 @@ layout_magnifier(int screen)
|
|||
geometry.width += 2 * c->border;
|
||||
geometry.y += geometry.height;
|
||||
}
|
||||
|
||||
bailout:
|
||||
p_delete(&curtags);
|
||||
}
|
||||
// vim: filetype=c:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=80
|
||||
|
|
Loading…
Reference in a new issue