move untileOnDrag from World to LayoutConfig
This commit is contained in:
@@ -8,4 +8,5 @@ type LayoutConfig = {
|
||||
skipSwitcher: boolean;
|
||||
tiledKeepBelow: boolean;
|
||||
maximizedKeepAbove: boolean;
|
||||
untileOnDrag: boolean;
|
||||
};
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
class World {
|
||||
public readonly untileOnDrag: boolean;
|
||||
private readonly desktopManager: DesktopManager;
|
||||
private readonly clientManager: ClientManager;
|
||||
private readonly pinManager: PinManager;
|
||||
@@ -8,7 +7,6 @@ class World {
|
||||
private readonly screenResizedDelayer: Delayer;
|
||||
|
||||
constructor(config: Config) {
|
||||
this.untileOnDrag = config.untileOnDrag;
|
||||
this.workspaceSignalManager = initWorkspaceSignalHandlers(this);
|
||||
this.shortcutActions = registerKeyBindings(this, {
|
||||
manualScrollStep: config.manualScrollStep,
|
||||
@@ -36,6 +34,7 @@ class World {
|
||||
skipSwitcher: config.skipSwitcher,
|
||||
tiledKeepBelow: config.tiledKeepBelow,
|
||||
maximizedKeepAbove: config.floatingKeepAbove,
|
||||
untileOnDrag: config.untileOnDrag,
|
||||
};
|
||||
|
||||
this.desktopManager = new DesktopManager(
|
||||
|
||||
@@ -13,7 +13,7 @@ namespace ClientState {
|
||||
const window = new Window(client, column);
|
||||
|
||||
this.window = window;
|
||||
this.signalManager = Tiled.initSignalManager(world, window);
|
||||
this.signalManager = Tiled.initSignalManager(world, window, grid.config);
|
||||
}
|
||||
|
||||
public destroy(passFocus: boolean) {
|
||||
@@ -27,7 +27,7 @@ namespace ClientState {
|
||||
Tiled.restoreClientAfterTiling(client, grid.config, this.defaultState, grid.desktop.clientArea);
|
||||
}
|
||||
|
||||
private static initSignalManager(world: World, window: Window) {
|
||||
private static initSignalManager(world: World, window: Window, config: LayoutConfig) {
|
||||
const client = window.client;
|
||||
const kwinClient = client.kwinClient;
|
||||
const manager = new SignalManager();
|
||||
@@ -73,7 +73,7 @@ namespace ClientState {
|
||||
let resizingBorder = false;
|
||||
manager.connect(kwinClient.interactiveMoveResizeStarted, () => {
|
||||
if (kwinClient.move) {
|
||||
if (world.untileOnDrag) {
|
||||
if (config.untileOnDrag) {
|
||||
world.do((clientManager, desktopManager) => {
|
||||
clientManager.floatKwinClient(kwinClient);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user