X-Git-Url: http://git.nikiroo.be/?a=blobdiff_plain;f=src%2Fjexer%2FTApplication.java;h=c0166b11c3daf492e7e5afc04ff0af4a0a2ca5a6;hb=fe0770f988e64fc0ccafd3d3b086b4a0eb559d3b;hp=691e1c7295f087e700f469c86bab059aa256cb41;hpb=df602ccf5e32585c26dc618dd3b4a759b6820943;p=nikiroo-utils.git diff --git a/src/jexer/TApplication.java b/src/jexer/TApplication.java index 691e1c7..c0166b1 100644 --- a/src/jexer/TApplication.java +++ b/src/jexer/TApplication.java @@ -1396,6 +1396,13 @@ public class TApplication implements Runnable { return; } + // Whatever window might be moving/dragging, stop it now. + for (TWindow w: windows) { + if (w.inMovements()) { + w.stopMovements(); + } + } + assert (windows.size() > 0); if (window.isHidden()) { @@ -1455,6 +1462,13 @@ public class TApplication implements Runnable { return; } + // Whatever window might be moving/dragging, stop it now. + for (TWindow w: windows) { + if (w.inMovements()) { + w.stopMovements(); + } + } + assert (windows.size() > 0); if (!window.hidden) { @@ -1486,6 +1500,13 @@ public class TApplication implements Runnable { return; } + // Whatever window might be moving/dragging, stop it now. + for (TWindow w: windows) { + if (w.inMovements()) { + w.stopMovements(); + } + } + assert (windows.size() > 0); if (window.hidden) { @@ -1511,6 +1532,13 @@ public class TApplication implements Runnable { } synchronized (windows) { + // Whatever window might be moving/dragging, stop it now. + for (TWindow w: windows) { + if (w.inMovements()) { + w.stopMovements(); + } + } + int z = window.getZ(); window.setZ(-1); window.onUnfocus(); @@ -1575,6 +1603,12 @@ public class TApplication implements Runnable { assert (activeWindow != null); synchronized (windows) { + // Whatever window might be moving/dragging, stop it now. + for (TWindow w: windows) { + if (w.inMovements()) { + w.stopMovements(); + } + } // Swap z/active between active window and the next in the list int activeWindowI = -1; @@ -1633,6 +1667,13 @@ public class TApplication implements Runnable { } synchronized (windows) { + // Whatever window might be moving/dragging, stop it now. + for (TWindow w: windows) { + if (w.inMovements()) { + w.stopMovements(); + } + } + // Do not allow a modal window to spawn a non-modal window. If a // modal window is active, then this window will become modal // too.