Implement moving of floating clients
This commit is contained in:
@ -928,7 +928,8 @@ void parse_command(xcb_connection_t *conn, const char *command) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (last_focused->floating >= FLOATING_AUTO_ON && action != ACTION_FOCUS) {
|
||||
if (last_focused->floating >= FLOATING_AUTO_ON &&
|
||||
(action != ACTION_FOCUS && action != ACTION_MOVE)) {
|
||||
LOG("Not performing (floating)\n");
|
||||
return;
|
||||
}
|
||||
@ -947,20 +948,32 @@ void parse_command(xcb_connection_t *conn, const char *command) {
|
||||
LOG("unknown direction: %c\n", *rest);
|
||||
return;
|
||||
}
|
||||
rest++;
|
||||
|
||||
if (action == ACTION_FOCUS) {
|
||||
if (last_focused->floating >= FLOATING_AUTO_ON)
|
||||
if (last_focused->floating >= FLOATING_AUTO_ON) {
|
||||
floating_focus_direction(conn, last_focused, direction);
|
||||
else focus_thing(conn, direction, (with == WITH_WINDOW ? THING_WINDOW : THING_CONTAINER));
|
||||
} else if (action == ACTION_MOVE) {
|
||||
continue;
|
||||
}
|
||||
focus_thing(conn, direction, (with == WITH_WINDOW ? THING_WINDOW : THING_CONTAINER));
|
||||
continue;
|
||||
}
|
||||
|
||||
if (action == ACTION_MOVE) {
|
||||
if (last_focused->floating >= FLOATING_AUTO_ON) {
|
||||
floating_move(conn, last_focused, direction);
|
||||
continue;
|
||||
}
|
||||
if (with == WITH_WINDOW)
|
||||
move_current_window(conn, direction);
|
||||
else move_current_container(conn, direction);
|
||||
continue;
|
||||
}
|
||||
else if (action == ACTION_SNAP)
|
||||
snap_current_container(conn, direction);
|
||||
|
||||
rest++;
|
||||
if (action == ACTION_SNAP) {
|
||||
snap_current_container(conn, direction);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
LOG("--- done ---\n");
|
||||
|
Reference in New Issue
Block a user