From 93b696f380869fe3e73ba4c2e4c7663de8452fab Mon Sep 17 00:00:00 2001 From: luboslenco Date: Fri, 24 Mar 2023 21:53:12 +0100 Subject: [PATCH] Fix tab drag and drop for multiple windows --- Sources/zui/Zui.hx | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/Sources/zui/Zui.hx b/Sources/zui/Zui.hx index 6199ea7e..773c5579 100644 --- a/Sources/zui/Zui.hx +++ b/Sources/zui/Zui.hx @@ -346,6 +346,16 @@ class Zui { } function endInput() { + if (onTabDrop != null && dragTabHandle != null) { + if (inputDX != 0 || inputDY != 0) { + Krom.setMouseCursor(1); // Hand + } + if (inputReleased) { + Krom.setMouseCursor(0); // Default + dragTabHandle = null; + } + } + isKeyPressed = false; inputStarted = false; inputStartedR = false; @@ -679,16 +689,6 @@ class Zui { } } - if (onTabDrop != null && dragTabHandle != null) { - if (inputDX != 0 || inputDY != 0) { - Krom.setMouseCursor(1); // Hand - } - if (inputReleased) { - Krom.setMouseCursor(0); // Default - dragTabHandle = null; - } - } - if (getInputInRect(_windowX, _windowY, _windowW, _windowH)) { hoveredTabName = tabNames[tabHandle.position]; hoveredTabX = _windowX;