mirror of
https://github.com/xpipe-io/xpipe.git
synced 2026-04-20 14:39:33 -04:00
[release]
This commit is contained in:
@@ -232,6 +232,9 @@ public final class BrowserFileSystemTabModel extends BrowserStoreSessionTab<File
|
||||
|
||||
// Check if the right side is already occupied
|
||||
var existingSplit = f.getEffectiveRightTab().getValue();
|
||||
if (existingSplit == this) {
|
||||
return false;
|
||||
}
|
||||
if (existingSplit != null && !(existingSplit instanceof BrowserTerminalDockTabModel)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -52,11 +52,6 @@ public class TerminalDockComp extends SimpleComp {
|
||||
update(stack);
|
||||
}
|
||||
};
|
||||
s.xProperty().addListener(update);
|
||||
s.yProperty().addListener(update);
|
||||
s.widthProperty().addListener(update);
|
||||
s.heightProperty().addListener(update);
|
||||
|
||||
var iconified = new ChangeListener<Boolean>() {
|
||||
@Override
|
||||
public void changed(ObservableValue<? extends Boolean> observable, Boolean oldValue, Boolean newValue) {
|
||||
@@ -67,8 +62,6 @@ public class TerminalDockComp extends SimpleComp {
|
||||
}
|
||||
}
|
||||
};
|
||||
s.iconifiedProperty().addListener(iconified);
|
||||
|
||||
var focus = new ChangeListener<Boolean>() {
|
||||
@Override
|
||||
public void changed(ObservableValue<? extends Boolean> observable, Boolean oldValue, Boolean newValue) {
|
||||
@@ -79,26 +72,21 @@ public class TerminalDockComp extends SimpleComp {
|
||||
}
|
||||
}
|
||||
};
|
||||
s.focusedProperty().addListener(focus);
|
||||
|
||||
var show = new EventHandler<WindowEvent>() {
|
||||
@Override
|
||||
public void handle(WindowEvent event) {
|
||||
update(stack);
|
||||
}
|
||||
};
|
||||
s.addEventFilter(WindowEvent.WINDOW_SHOWN, show);
|
||||
|
||||
var hide = new EventHandler<WindowEvent>() {
|
||||
@Override
|
||||
public void handle(WindowEvent event) {
|
||||
update(stack);
|
||||
}
|
||||
};
|
||||
s.addEventFilter(WindowEvent.WINDOW_HIDING, hide);
|
||||
|
||||
stack.sceneProperty().addListener((observable, oldValue, newValue) -> {
|
||||
if (oldValue != null && newValue == null) {
|
||||
stack.sceneProperty().subscribe(scene -> {
|
||||
if (scene == null) {
|
||||
s.xProperty().removeListener(update);
|
||||
s.yProperty().removeListener(update);
|
||||
s.widthProperty().removeListener(update);
|
||||
@@ -107,6 +95,16 @@ public class TerminalDockComp extends SimpleComp {
|
||||
s.focusedProperty().removeListener(focus);
|
||||
s.removeEventFilter(WindowEvent.WINDOW_SHOWN, show);
|
||||
s.removeEventFilter(WindowEvent.WINDOW_HIDING, hide);
|
||||
} else {
|
||||
s.xProperty().addListener(update);
|
||||
s.yProperty().addListener(update);
|
||||
s.widthProperty().addListener(update);
|
||||
s.heightProperty().addListener(update);
|
||||
s.iconifiedProperty().addListener(iconified);
|
||||
s.focusedProperty().addListener(focus);
|
||||
s.addEventFilter(WindowEvent.WINDOW_SHOWN, show);
|
||||
s.addEventFilter(WindowEvent.WINDOW_HIDING, hide);
|
||||
update(stack);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -22,9 +22,8 @@ public interface WindowsTerminalType extends ExternalTerminalType, TrackableTerm
|
||||
static AtomicInteger windowCounter = new AtomicInteger(2);
|
||||
|
||||
private static CommandBuilder toCommand(TerminalLaunchConfiguration configuration) throws Exception {
|
||||
var cmd = CommandBuilder.of().addIf(configuration.isPreferTabs(), "-w", "1")
|
||||
.addIf(!configuration.isPreferTabs(),"-w", "" + windowCounter.getAndIncrement())
|
||||
.add("nt");
|
||||
var cmd = CommandBuilder.of().addIf(configuration.isPreferTabs(), "-w", "1", "nt")
|
||||
.addIf(!configuration.isPreferTabs(),"-w", "" + windowCounter.getAndIncrement());
|
||||
|
||||
if (configuration.getColor() != null) {
|
||||
cmd.add("--tabColor").addQuoted(configuration.getColor().toHexString());
|
||||
|
||||
2
dist/changelogs/13.3.2_incremental.md
vendored
2
dist/changelogs/13.3.2_incremental.md
vendored
@@ -1 +1,3 @@
|
||||
- Fix Windows Terminal docking not working probably if new instance behavior had been set to attach in the Windows Terminal settings
|
||||
- Fix terminal dock not moving terminals anymore after tab switch
|
||||
- Fix terminal still trying to dock when launched from a pinned tab
|
||||
|
||||
Reference in New Issue
Block a user