diff --git a/app/src/main/java/io/xpipe/app/beacon/impl/AskpassExchangeImpl.java b/app/src/main/java/io/xpipe/app/beacon/impl/AskpassExchangeImpl.java index dc46a58fc..6034f61fb 100644 --- a/app/src/main/java/io/xpipe/app/beacon/impl/AskpassExchangeImpl.java +++ b/app/src/main/java/io/xpipe/app/beacon/impl/AskpassExchangeImpl.java @@ -56,7 +56,7 @@ public class AskpassExchangeImpl extends AskpassExchange { return; } - term.get().frontOfMainWindow(); + term.get().focus(); } @Override diff --git a/app/src/main/java/io/xpipe/app/core/window/NativeWinWindowControl.java b/app/src/main/java/io/xpipe/app/core/window/NativeWinWindowControl.java index b9ae106bb..533ab0c9c 100644 --- a/app/src/main/java/io/xpipe/app/core/window/NativeWinWindowControl.java +++ b/app/src/main/java/io/xpipe/app/core/window/NativeWinWindowControl.java @@ -1,5 +1,6 @@ package io.xpipe.app.core.window; +import io.sentry.protocol.User; import io.xpipe.app.util.Rect; import javafx.stage.Window; @@ -119,6 +120,10 @@ public class NativeWinWindowControl { return r.longValue() == 0; } + public void activate() { + User32.INSTANCE.SetForegroundWindow(windowHandle); + } + public boolean setWindowBackdrop(DwmSystemBackDropType backdrop) { var r = Dwm.INSTANCE.DwmSetWindowAttribute( windowHandle, diff --git a/app/src/main/java/io/xpipe/app/terminal/TerminalViewInstance.java b/app/src/main/java/io/xpipe/app/terminal/TerminalViewInstance.java index 1d3c0e288..7827169c8 100644 --- a/app/src/main/java/io/xpipe/app/terminal/TerminalViewInstance.java +++ b/app/src/main/java/io/xpipe/app/terminal/TerminalViewInstance.java @@ -26,6 +26,8 @@ public abstract class TerminalViewInstance { public abstract void frontOfMainWindow(); + public abstract void focus(); + public abstract void updatePosition(Rect bounds); public abstract void close(); diff --git a/app/src/main/java/io/xpipe/app/terminal/WindowsTerminalViewInstance.java b/app/src/main/java/io/xpipe/app/terminal/WindowsTerminalViewInstance.java index c53cd17de..884045def 100644 --- a/app/src/main/java/io/xpipe/app/terminal/WindowsTerminalViewInstance.java +++ b/app/src/main/java/io/xpipe/app/terminal/WindowsTerminalViewInstance.java @@ -45,6 +45,11 @@ public final class WindowsTerminalViewInstance extends TerminalViewInstance { this.control.defaultOrder(); } + @Override + public void focus() { + this.control.activate(); + } + @Override public void updatePosition(Rect bounds) { control.move(bounds); diff --git a/dist/changelogs/13.0.md b/dist/changelogs/13.0.md index 3a289c10a..94d23107b 100644 --- a/dist/changelogs/13.0.md +++ b/dist/changelogs/13.0.md @@ -27,6 +27,9 @@ There's now a new mechanism in place for checking for security updates separatel - The settings menu now shows a restart button when a setting has been change that requires a restart to apply - There is now an intro to scripts to provide some more information before using scripts - Add ability to enable agent forwarding when using the SSH-Agent for identities +- Closing a terminal while a session is loading will now cancel the launch (on Windows for now) +- A newly opened terminal will now regain focus after any password prompt was entered in xpipe +- You can now override a VM IP if you're using an advanced networking setup ## Fixes diff --git a/version b/version index 4d78ac4fe..8e425fd5f 100644 --- a/version +++ b/version @@ -1 +1 @@ -13.0-8 +13.0-9