[placement] Fix smart placement with window which had titlebars
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
553af0db03
commit
4a40929d9b
10
placement.c
10
placement.c
|
@ -113,10 +113,7 @@ placement_smart(Client *c)
|
||||||
|
|
||||||
newgeometry = titlebar_geometry_add(&c->titlebar, newgeometry);
|
newgeometry = titlebar_geometry_add(&c->titlebar, newgeometry);
|
||||||
newgeometry = placement_fix_offscreen(newgeometry, c->screen, c->border);
|
newgeometry = placement_fix_offscreen(newgeometry, c->screen, c->border);
|
||||||
|
newgeometry = titlebar_geometry_remove(&c->titlebar, newgeometry);
|
||||||
/* restore height and width again */
|
|
||||||
newgeometry.width = c->f_geometry.width;
|
|
||||||
newgeometry.height = c->f_geometry.height;
|
|
||||||
|
|
||||||
area_list_wipe(&arealist);
|
area_list_wipe(&arealist);
|
||||||
|
|
||||||
|
@ -140,10 +137,7 @@ placement_under_mouse(Client *c)
|
||||||
|
|
||||||
finalgeometry = titlebar_geometry_add(&c->titlebar, finalgeometry);
|
finalgeometry = titlebar_geometry_add(&c->titlebar, finalgeometry);
|
||||||
finalgeometry = placement_fix_offscreen(finalgeometry, c->screen, c->border);
|
finalgeometry = placement_fix_offscreen(finalgeometry, c->screen, c->border);
|
||||||
|
finalgeometry = titlebar_geometry_remove(&c->titlebar, finalgeometry);
|
||||||
/* restore height and width */
|
|
||||||
finalgeometry.height = c->f_geometry.height;
|
|
||||||
finalgeometry.width = c->f_geometry.width;
|
|
||||||
|
|
||||||
return finalgeometry;
|
return finalgeometry;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue