From f5717587ec4c9ff49eeb9c6f762447af509c40e0 Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Mon, 18 Aug 2008 10:56:40 +0200 Subject: [PATCH] mouse: snap also on scren without titlebars Signed-off-by: Julien Danjou --- mouse.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/mouse.c b/mouse.c index 414399d6..606565c5 100644 --- a/mouse.c +++ b/mouse.c @@ -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)) {