Skip to content

Commit

Permalink
Fix bug where the child windows of floating windows appear behind them
Browse files Browse the repository at this point in the history
  • Loading branch information
OverloadedOrama committed Feb 15, 2025
1 parent 4786a32 commit b4b32b2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion addons/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Files extracted from source:
## godot-dockable-container

- Upstream: https://github.com/gilzoide/godot-dockable-container
- Version: Based on [e852cbeeb3f06f62c559898b4cf5756858367766](https://github.com/OverloadedOrama/godot-dockable-container/commit/e852cbeeb3f06f62c559898b4cf5756858367766), but with changes in layout.gd that add a `save_on_change` and `layout_reset_path` variables, and a `save()`, `copy_from()` and `reset()` methods, a fix in dockable_container.gd's line 44, and another on dockable_panel.gd's lines 86 and 87.
- Version: Based on [3f10b9b6f24311090a6010da82d6eaf110e92836](https://github.com/OverloadedOrama/godot-dockable-container/commit/3f10b9b6f24311090a6010da82d6eaf110e92836), but with changes in layout.gd that add a `save_on_change` and `layout_reset_path` variables, and a `save()`, `copy_from()` and `reset()` methods, a fix in dockable_container.gd's line 44, and another on dockable_panel.gd's lines 86 and 87.
- License: [CC0-1.0](https://github.com/gilzoide/godot-dockable-container/blob/main/LICENSE)

## SmartSlicer
Expand Down
6 changes: 6 additions & 0 deletions addons/dockable_container/floating_window.gd
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@ func _ready() -> void:
position = DisplayServer.window_get_size() / 2 - size / 2
else:
position = DisplayServer.screen_get_usable_rect().size / 2 - size / 2
# Enable always_on_top for all child windows.
# TODO: Remove the loop when this bug gets fixed in Godot's side.
# Probably when https://github.com/godotengine/godot/issues/92848 is closed.
for dialog_child in find_children("", "Window", true, false):
if dialog_child is Window:
dialog_child.always_on_top = always_on_top


func _input(event: InputEvent) -> void:
Expand Down

0 comments on commit b4b32b2

Please sign in to comment.