[mouse] Fix bug with floating

Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Julien Danjou 2008-06-09 18:16:55 +02:00
parent 00f966ea04
commit 89daa72790
1 changed files with 17 additions and 2 deletions

19
mouse.c
View File

@ -365,6 +365,21 @@ mouse_client_move(client_t *c, int snap)
geometry.y = ocy + (ev_motion->event_y - query_pointer_r->root_y); geometry.y = ocy + (ev_motion->event_y - query_pointer_r->root_y);
geometry = mouse_snapclient(c, geometry, snap); geometry = mouse_snapclient(c, geometry, snap);
if((newscreen = screen_get_bycoord(globalconf.screens_info, screen,
geometry.x, geometry.y)) != screen)
{
if((ws = globalconf.screens[newscreen].workspace))
{
screen = workspace_screen_get(ws);
workspace_client_set(c, ws);
}
else
{
p_delete(&ev);
break;
}
}
c->ismoving = true; c->ismoving = true;
client_resize(c, geometry, false); client_resize(c, geometry, false);
c->ismoving = false; c->ismoving = false;
@ -771,8 +786,8 @@ static int
luaA_mouse_screen_get(lua_State *L) luaA_mouse_screen_get(lua_State *L)
{ {
int screen; int screen;
xcb_query_pointer_cookie_t qc; xcb_query_pointer_cookie_t qc;
xcb_query_pointer_reply_t *qr; xcb_query_pointer_reply_t *qr;
qc = xcb_query_pointer(globalconf.connection, qc = xcb_query_pointer(globalconf.connection,
xcb_aux_get_screen(globalconf.connection, xcb_aux_get_screen(globalconf.connection,