mirror of
https://github.com/miracle-wm-org/miracle-wm.git
synced 2024-11-23 04:08:27 +03:00
bugfix #17: fix for ghost node upon window move
This commit is contained in:
parent
b8b4395ab8
commit
05deb43919
@ -22,7 +22,7 @@ Features:
|
||||
- [x] Fullscreen application support
|
||||
|
||||
# 0.2.0
|
||||
**Stabilization + Usability (Due: March 1st)**
|
||||
**Stabilization + Usability (Due: March 15th)**
|
||||
|
||||
Features:
|
||||
- [ ] Fix major bugs
|
||||
@ -31,8 +31,9 @@ Features:
|
||||
- [x] Action key
|
||||
- [x] Keybindings
|
||||
- [ ] Hot reloading
|
||||
- [x] Startup apps
|
||||
- [ ] Display configuration
|
||||
- [ ] Workspaces
|
||||
- [ ] Moving windows between workspaces
|
||||
- [ ] Stacking windows
|
||||
- [ ] Highlight border around selected window
|
||||
- [ ] Fullscreen windows
|
||||
|
@ -236,7 +236,17 @@ bool WindowTree::try_move_active_window(miracle::Direction direction)
|
||||
{
|
||||
auto index = second_parent->get_index_of_node(second_window);
|
||||
auto moving_node = active_window;
|
||||
first_parent->remove_node(moving_node);
|
||||
if (first_parent->num_nodes() == 1 && first_parent->get_parent())
|
||||
{
|
||||
// Remove the entire lane if this lane is now empty
|
||||
auto prev_active = first_parent;
|
||||
first_parent = first_parent->get_parent();
|
||||
first_parent->remove_node(prev_active);
|
||||
}
|
||||
else
|
||||
{
|
||||
first_parent->remove_node(moving_node);
|
||||
}
|
||||
second_parent->insert_node(moving_node, index + 1);
|
||||
}
|
||||
return true;
|
||||
|
Loading…
Reference in New Issue
Block a user