mouse: snap also on scren without titlebars
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
2aadb3a97b
commit
f5717587ec
8
mouse.c
8
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].statusbar,
|
||||||
&globalconf.screens[c->screen].padding);
|
&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 = titlebar_geometry_add(c->titlebar, c->border, geometry);
|
||||||
geometry.width += 2 * c->border;
|
geometry.width += 2 * c->border;
|
||||||
geometry.height += 2 * c->border;
|
geometry.height += 2 * c->border;
|
||||||
|
@ -141,6 +146,9 @@ mouse_snapclient(client_t *c, area_t geometry, int snap)
|
||||||
geometry =
|
geometry =
|
||||||
mouse_snapclienttogeometry_inside(geometry, screen_geometry, snap);
|
mouse_snapclienttogeometry_inside(geometry, screen_geometry, snap);
|
||||||
|
|
||||||
|
geometry =
|
||||||
|
mouse_snapclienttogeometry_inside(geometry, screen_geometry_barless, snap);
|
||||||
|
|
||||||
for(snapper = globalconf.clients; snapper; snapper = snapper->next)
|
for(snapper = globalconf.clients; snapper; snapper = snapper->next)
|
||||||
if(snapper != c && client_isvisible(c, c->screen))
|
if(snapper != c && client_isvisible(c, c->screen))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue