mouse: snap also on scren without titlebars

Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Julien Danjou 2008-08-18 10:56:40 +02:00
parent 2aadb3a97b
commit f5717587ec
1 changed files with 8 additions and 0 deletions

View File

@ -134,6 +134,11 @@ mouse_snapclient(client_t *c, area_t geometry, int snap)
globalconf.screens[c->screen].statusbar,
&globalconf.screens[c->screen].padding);
area_t screen_geometry_barless =
screen_area_get(&globalconf.screens[c->screen].geometry,
NULL,
&globalconf.screens[c->screen].padding);
geometry = titlebar_geometry_add(c->titlebar, c->border, geometry);
geometry.width += 2 * c->border;
geometry.height += 2 * c->border;
@ -141,6 +146,9 @@ mouse_snapclient(client_t *c, area_t geometry, int snap)
geometry =
mouse_snapclienttogeometry_inside(geometry, screen_geometry, snap);
geometry =
mouse_snapclienttogeometry_inside(geometry, screen_geometry_barless, snap);
for(snapper = globalconf.clients; snapper; snapper = snapper->next)
if(snapper != c && client_isvisible(c, c->screen))
{