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)) {