feat(wm): impl drag to move in append mode

This commit ensures that when a window is dragged over another window container while
WindowContainerBehaviour::Append is set, the window will be removed from its current
container and appended to the target container instead of swapping the positions of the two
containers, as would be the case for WindowContainerBehaviour::Create.

re #72
This commit is contained in:
LGUG2Z
2021-11-15 12:38:08 -08:00
parent 676b643faf
commit 4a19edaab2
6 changed files with 55 additions and 33 deletions

View File

@@ -484,7 +484,7 @@ enum SubCommand {
#[clap(setting = AppSettings::ArgRequiredElseHelp)]
WorkspaceName(WorkspaceName),
/// Toggle the behaviour for new windows (stacking or dynamic tiling)
ToggleNewWindowBehaviour,
ToggleWindowContainerBehaviour,
/// Toggle window tiling on the focused workspace
TogglePause,
/// Toggle window tiling on the focused workspace
@@ -960,8 +960,8 @@ fn main() -> Result<()> {
SubCommand::ResizeDelta(arg) => {
send_message(&*SocketMessage::ResizeDelta(arg.pixels).as_bytes()?)?;
}
SubCommand::ToggleNewWindowBehaviour => {
send_message(&*SocketMessage::ToggleNewWindowBehaviour.as_bytes()?)?;
SubCommand::ToggleWindowContainerBehaviour => {
send_message(&*SocketMessage::ToggleWindowContainerBehaviour.as_bytes()?)?;
}
}