Bugfix: Correctly do boundary checking/moving to other workspaces when moving floating clients via keyboard (Thanks sasha)
This commit is contained in:
@ -228,7 +228,9 @@ void reposition_client(xcb_connection_t *conn, Client *client) {
|
||||
return;
|
||||
|
||||
/* If the client is floating, we need to check if we moved it to a different workspace */
|
||||
if (client->workspace->screen == (screen = get_screen_containing(client->rect.x, client->rect.y)))
|
||||
screen = get_screen_containing(client->rect.x + (client->rect.width / 2),
|
||||
client->rect.y + (client->rect.height / 2));
|
||||
if (client->workspace->screen == screen)
|
||||
return;
|
||||
|
||||
if (screen == NULL) {
|
||||
@ -239,6 +241,8 @@ void reposition_client(xcb_connection_t *conn, Client *client) {
|
||||
DLOG("Client is on workspace %p with screen %p\n", client->workspace, client->workspace->screen);
|
||||
DLOG("but screen at %d, %d is %p\n", client->rect.x, client->rect.y, screen);
|
||||
floating_assign_to_workspace(client, screen->current_workspace);
|
||||
|
||||
set_focus(conn, client, true);
|
||||
}
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user