Repository: godotengine/godot (language: cpp)

Issue:
Quick double-click an object inspector left the dropdown background remain visible
### Tested versions

v4.4.stable.mono.official [4c311cbee]

### System information

Godot v4.4.stable.mono - Windows 10 (build 19044) - Multi-window, 4 monitors - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 4060 Ti (NVIDIA; 32.0.15.7260) - AMD Ryzen 9 5900X 12-Core Processor (24 threads)

### Issue description

https://github.com/user-attachments/assets/80aa573b-7c4f-4ddc-bc08-087b0c8f0403

### Steps to reproduce

1. Perform a quick double-click on the `Script` property inspector
2. Inspect the issue


### Minimal reproduction project (MRP)

Any project


Discussion / hints:
wayland:

https://github.com/user-attachments/assets/bdae4291-b101-47de-a5fe-3dcb396b642c

xwayland:

https://github.com/user-attachments/assets/f967d882-4817-4c9b-98f4-adc52d7514d5

Unable to reproduce on Linux XWayland and Wayland, so it's likely a Windows only issue.
@scgm0  It's interesting that the dropdown double-click behavior is different on different Linux APIs.
cc @AThousandShips The issue is about `windows`, there is no problem with the `linuxbsd` platform
There should be a couple of issues on this topic already

Here is one of them, https://github.com/godotengine/godot/issues/99581 
As I see every time multi-window mode is involved.


Fix patch:
diff --git a/editor/editor_resource_picker.cpp b/editor/editor_resource_picker.cpp
index 0064c8bb692b..79d033bf0338 100644
--- a/editor/editor_resource_picker.cpp
+++ b/editor/editor_resource_picker.cpp
@@ -183,6 +183,12 @@ void EditorResourcePicker::_resource_saved(Object *p_resource) {
 }
 
 void EditorResourcePicker::_update_menu() {
+	if (edit_menu && edit_menu->is_visible()) {
+		edit_button->set_pressed(false);
+		edit_menu->hide();
+		return;
+	}
+
 	_update_menu_items();
 
 	Rect2 gt = edit_button->get_screen_rect();
@@ -549,6 +555,12 @@ void EditorResourcePicker::_button_input(const Ref<InputEvent> &p_event) {
 		// a valid resource or the Picker is editable, as
 		// there will otherwise be nothing to display.
 		if (edited_resource.is_valid() || is_editable()) {
+			if (edit_menu && edit_menu->is_visible()) {
+				edit_button->set_pressed(false);
+				edit_menu->hide();
+				return;
+			}
+
 			_update_menu_items();
 
 			Vector2 pos = get_screen_position() + mb->get_position();


Test patch: