[release]

This commit is contained in:
crschnick
2024-11-26 16:46:26 +00:00
parent 22f14ba6d0
commit 4e88ed2fff
4 changed files with 19 additions and 17 deletions

View File

@@ -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;
}

View File

@@ -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);
}
});
}

View File

@@ -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());

View File

@@ -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