From 310140e91bd40740240316f7cca72f84438d4ab1 Mon Sep 17 00:00:00 2001 From: stefnotch Date: Wed, 23 Dec 2020 14:11:11 +0100 Subject: [PATCH 1/2] Fix context menu disappearing Fix #10 --- Source/Editor/GUI/ContextMenu/ContextMenuBase.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Editor/GUI/ContextMenu/ContextMenuBase.cs b/Source/Editor/GUI/ContextMenu/ContextMenuBase.cs index 7fb3fe38a..615be2d5b 100644 --- a/Source/Editor/GUI/ContextMenu/ContextMenuBase.cs +++ b/Source/Editor/GUI/ContextMenu/ContextMenuBase.cs @@ -303,7 +303,7 @@ namespace FlaxEditor.GUI.ContextMenu if (_parentCM != null) { // Focus parent if user clicked over the parent popup - var mouse = _parentCM.ScreenToClient(FlaxEngine.Input.MouseScreenPosition / Platform.DpiScale); + var mouse = _parentCM.ScreenToClient(FlaxEngine.Input.MouseScreenPosition); if (_parentCM.ContainsPoint(ref mouse)) { _parentCM._window.Focus(); From 0679aebfacf2daed51a4da63b9f810a88bb7a507 Mon Sep 17 00:00:00 2001 From: stefnotch Date: Wed, 23 Dec 2020 14:12:53 +0100 Subject: [PATCH 2/2] Fix docking hints jumping around on high dpi screens --- Source/Editor/GUI/Docking/DockHintWindow.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Source/Editor/GUI/Docking/DockHintWindow.cs b/Source/Editor/GUI/Docking/DockHintWindow.cs index c956bb9ad..d8228598a 100644 --- a/Source/Editor/GUI/Docking/DockHintWindow.cs +++ b/Source/Editor/GUI/Docking/DockHintWindow.cs @@ -223,8 +223,7 @@ namespace FlaxEditor.GUI.Docking _mouse = FlaxEngine.Input.MouseScreenPosition; // Check intersection with any dock panel - var dpiScale = Platform.DpiScale; - var uiMouse = _mouse / dpiScale; + var uiMouse = _mouse; _toDock = _toMove.MasterPanel.HitTest(ref uiMouse, _toMove); // Check dock state to use