Compare commits
12 Commits
v0.9.2
...
per-screen
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
aec5750dc0 | ||
|
|
6784259c12 | ||
|
|
23186bbe91 | ||
|
|
d7df3901e2 | ||
|
|
b85c86e7db | ||
|
|
fdb4b88333 | ||
|
|
4e3d924366 | ||
|
|
3d3e8cff17 | ||
|
|
a79229da75 | ||
|
|
53d04c1d33 | ||
|
|
a18ff61d9e | ||
|
|
99ffad9223 |
@@ -9,7 +9,7 @@
|
||||
"Name": "Peter Fajdiga"
|
||||
}],
|
||||
"Id": "karousel",
|
||||
"Version": "0.9.2",
|
||||
"Version": "0.9.3",
|
||||
"License": "GPLv3",
|
||||
"Website": "https://github.com/peterfajdiga/karousel",
|
||||
"BugReportUrl": "https://github.com/peterfajdiga/karousel/issues"
|
||||
|
||||
@@ -148,13 +148,13 @@ namespace Actions {
|
||||
|
||||
case "column-move-start": return () => {
|
||||
world.doIfTiledFocused(true, (clientManager, desktopManager, window, column, grid) => {
|
||||
column.moveAfter(null);
|
||||
grid.moveColumn(column, null);
|
||||
});
|
||||
};
|
||||
|
||||
case "column-move-end": return () => {
|
||||
world.doIfTiledFocused(true, (clientManager, desktopManager, window, column, grid) => {
|
||||
column.moveAfter(grid.getLastColumn());
|
||||
grid.moveColumn(column, grid.getLastColumn());
|
||||
});
|
||||
};
|
||||
|
||||
@@ -286,10 +286,10 @@ namespace Actions {
|
||||
if (targetColumn === null || targetColumn === column) {
|
||||
return;
|
||||
}
|
||||
if (targetColumn.isAfter(column)) {
|
||||
column.moveAfter(targetColumn);
|
||||
if (targetColumn.isToTheRightOf(column)) {
|
||||
grid.moveColumn(column, targetColumn);
|
||||
} else {
|
||||
column.moveAfter(grid.getPrevColumn(targetColumn));
|
||||
grid.moveColumn(column, grid.getPrevColumn(targetColumn));
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
@@ -3,6 +3,10 @@ const defaultWindowRules = `[
|
||||
"class": "ksmserver-logout-greeter",
|
||||
"tile": false
|
||||
},
|
||||
{
|
||||
"class": "xwaylandvideobridge",
|
||||
"tile": false
|
||||
},
|
||||
{
|
||||
"class": "(org\\\\.kde\\\\.)?plasmashell",
|
||||
"tile": false
|
||||
@@ -62,32 +66,32 @@ const configDef = [
|
||||
{
|
||||
name: "gapsOuterTop",
|
||||
type: "UInt",
|
||||
default: 18,
|
||||
default: 16,
|
||||
},
|
||||
{
|
||||
name: "gapsOuterBottom",
|
||||
type: "UInt",
|
||||
default: 18,
|
||||
default: 16,
|
||||
},
|
||||
{
|
||||
name: "gapsOuterLeft",
|
||||
type: "UInt",
|
||||
default: 18,
|
||||
default: 16,
|
||||
},
|
||||
{
|
||||
name: "gapsOuterRight",
|
||||
type: "UInt",
|
||||
default: 18,
|
||||
default: 16,
|
||||
},
|
||||
{
|
||||
name: "gapsInnerHorizontal",
|
||||
type: "UInt",
|
||||
default: 18,
|
||||
default: 8,
|
||||
},
|
||||
{
|
||||
name: "gapsInnerVertical",
|
||||
type: "UInt",
|
||||
default: 18,
|
||||
default: 8,
|
||||
},
|
||||
{
|
||||
name: "manualScrollStep",
|
||||
|
||||
10
src/lib/extern/kwin.ts
vendored
10
src/lib/extern/kwin.ts
vendored
@@ -8,6 +8,7 @@ type Workspace = {
|
||||
readonly currentDesktop: KwinDesktop;
|
||||
readonly currentActivity: string;
|
||||
readonly activeScreen: Output;
|
||||
readonly screens: Output[];
|
||||
readonly windows: KwinClient[];
|
||||
readonly cursorPos: Readonly<QmlPoint>;
|
||||
|
||||
@@ -17,8 +18,9 @@ type Workspace = {
|
||||
readonly windowAdded: QSignal<[KwinClient]>;
|
||||
readonly windowRemoved: QSignal<[KwinClient]>;
|
||||
readonly windowActivated: QSignal<[KwinClient]>;
|
||||
readonly desktopsChanged: QSignal<[]>;
|
||||
readonly screensChanged: QSignal<[]>;
|
||||
readonly activitiesChanged: QSignal<[]>;
|
||||
readonly desktopsChanged: QSignal<[]>;
|
||||
readonly currentActivityChanged: QSignal<[]>;
|
||||
readonly virtualScreenSizeChanged: QSignal<[]>;
|
||||
|
||||
@@ -44,7 +46,10 @@ const enum MaximizedMode {
|
||||
}
|
||||
|
||||
type Tile = unknown;
|
||||
type Output = unknown;
|
||||
|
||||
type Output = {
|
||||
name: string;
|
||||
};
|
||||
|
||||
interface KwinClient {
|
||||
readonly shadeable: boolean;
|
||||
@@ -81,6 +86,7 @@ interface KwinClient {
|
||||
|
||||
readonly fullScreenChanged: QSignal<[]>;
|
||||
readonly desktopsChanged: QSignal<[]>;
|
||||
readonly outputChanged: QSignal<[]>;
|
||||
readonly activitiesChanged: QSignal<[]>;
|
||||
readonly minimizedChanged: QSignal<[]>;
|
||||
readonly maximizedAboutToChange: QSignal<[MaximizedMode]>
|
||||
|
||||
@@ -19,7 +19,7 @@ class Column {
|
||||
|
||||
public moveToGrid(targetGrid: Grid, prevColumn: Column|null) {
|
||||
if (targetGrid === this.grid) {
|
||||
this.grid.onColumnMoved(this, prevColumn);
|
||||
this.grid.moveColumn(this, prevColumn);
|
||||
} else {
|
||||
this.grid.onColumnRemoved(this, false);
|
||||
this.grid = targetGrid;
|
||||
@@ -30,21 +30,14 @@ class Column {
|
||||
}
|
||||
}
|
||||
|
||||
public moveAfter(prevColumn: Column|null) {
|
||||
if (prevColumn === this) {
|
||||
return;
|
||||
}
|
||||
this.grid.onColumnMoved(this, prevColumn);
|
||||
}
|
||||
|
||||
public isAfter(other: Column) {
|
||||
return this.gridX > other.gridX;
|
||||
}
|
||||
|
||||
public isBefore(other: Column) {
|
||||
public isToTheLeftOf(other: Column) {
|
||||
return this.gridX < other.gridX;
|
||||
}
|
||||
|
||||
public isToTheRightOf(other: Column) {
|
||||
return this.gridX > other.gridX;
|
||||
}
|
||||
|
||||
public moveWindowUp(window: Window) {
|
||||
this.windows.moveBack(window);
|
||||
this.grid.desktop.onLayoutChanged();
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
class Desktop {
|
||||
public readonly grid: Grid;
|
||||
public readonly screen: Output;
|
||||
public readonly kwinDesktop: KwinDesktop;
|
||||
private readonly pinManager: PinManager;
|
||||
private readonly config: Desktop.Config;
|
||||
@@ -10,21 +11,22 @@ class Desktop {
|
||||
public clientArea: QmlRect;
|
||||
public tilingArea: QmlRect;
|
||||
|
||||
constructor(kwinDesktop: KwinDesktop, pinManager: PinManager, config: Desktop.Config, layoutConfig: LayoutConfig) {
|
||||
constructor(screen: Output, kwinDesktop: KwinDesktop, pinManager: PinManager, config: Desktop.Config, layoutConfig: LayoutConfig) {
|
||||
this.pinManager = pinManager;
|
||||
this.config = config;
|
||||
this.scrollX = 0;
|
||||
this.dirty = true;
|
||||
this.dirtyScroll = true;
|
||||
this.dirtyPins = true;
|
||||
this.screen = screen;
|
||||
this.kwinDesktop = kwinDesktop;
|
||||
this.grid = new Grid(this, layoutConfig);
|
||||
this.clientArea = Desktop.getClientArea(kwinDesktop);
|
||||
this.clientArea = Desktop.getClientArea(screen, kwinDesktop);
|
||||
this.tilingArea = Desktop.getTilingArea(this.clientArea, kwinDesktop, pinManager, config);
|
||||
}
|
||||
|
||||
private updateArea() {
|
||||
const newClientArea = Desktop.getClientArea(this.kwinDesktop);
|
||||
const newClientArea = Desktop.getClientArea(this.screen, this.kwinDesktop);
|
||||
if (newClientArea === this.clientArea && !this.dirtyPins) {
|
||||
return;
|
||||
}
|
||||
@@ -37,8 +39,8 @@ class Desktop {
|
||||
this.autoAdjustScroll();
|
||||
}
|
||||
|
||||
private static getClientArea(kwinDesktop: KwinDesktop) {
|
||||
return Workspace.clientArea(ClientAreaOption.PlacementArea, Workspace.activeScreen, kwinDesktop);
|
||||
private static getClientArea(screen: Output, kwinDesktop: KwinDesktop) {
|
||||
return Workspace.clientArea(ClientAreaOption.PlacementArea, screen, kwinDesktop);
|
||||
}
|
||||
|
||||
private static getTilingArea(clientArea: QmlRect, kwinDesktop: KwinDesktop, pinManager: PinManager, config: Desktop.Config) {
|
||||
|
||||
@@ -24,6 +24,18 @@ class Grid {
|
||||
});
|
||||
}
|
||||
|
||||
public moveColumn(column: Column, prevColumn: Column|null) {
|
||||
if (column === prevColumn) {
|
||||
return;
|
||||
}
|
||||
const movedLeft = prevColumn === null ? true : column.isToTheRightOf(prevColumn);
|
||||
const firstMovedColumn = movedLeft ? column : this.getNextColumn(column);
|
||||
this.columns.move(column, prevColumn);
|
||||
this.columnsSetX(firstMovedColumn);
|
||||
this.desktop.onLayoutChanged();
|
||||
this.desktop.autoAdjustScroll();
|
||||
}
|
||||
|
||||
public moveColumnLeft(column: Column) {
|
||||
this.columns.moveBack(column);
|
||||
this.columnsSetX(column);
|
||||
@@ -180,15 +192,6 @@ class Grid {
|
||||
}
|
||||
}
|
||||
|
||||
public onColumnMoved(column: Column, prevColumn: Column|null) {
|
||||
const movedLeft = prevColumn === null ? true : column.isAfter(prevColumn);
|
||||
const firstMovedColumn = movedLeft ? column : this.getNextColumn(column);
|
||||
this.columns.move(column, prevColumn);
|
||||
this.columnsSetX(firstMovedColumn);
|
||||
this.desktop.onLayoutChanged();
|
||||
this.desktop.autoAdjustScroll();
|
||||
}
|
||||
|
||||
public onColumnWidthChanged(column: Column) {
|
||||
const nextColumn = this.columns.getNext(column);
|
||||
this.columnsSetX(nextColumn);
|
||||
|
||||
@@ -36,7 +36,7 @@ class Window {
|
||||
if (this.column.grid.config.reMaximize && this.isFocused()) {
|
||||
// do this here rather than in `onFocused` to ensure it happens after placement
|
||||
// (otherwise placement may not happen at all)
|
||||
if (this.focusedState.maximizedMode > MaximizedMode.Unmaximized) {
|
||||
if (this.focusedState.maximizedMode !== MaximizedMode.Unmaximized) {
|
||||
this.client.setMaximize(
|
||||
this.focusedState.maximizedMode === MaximizedMode.Horizontally || this.focusedState.maximizedMode === MaximizedMode.Maximized,
|
||||
this.focusedState.maximizedMode === MaximizedMode.Vertically || this.focusedState.maximizedMode === MaximizedMode.Maximized,
|
||||
@@ -79,7 +79,7 @@ class Window {
|
||||
}
|
||||
|
||||
public onMaximizedChanged(maximizedMode: MaximizedMode) {
|
||||
const maximized = maximizedMode > MaximizedMode.Unmaximized;
|
||||
const maximized = maximizedMode !== MaximizedMode.Unmaximized;
|
||||
this.skipArrange = maximized;
|
||||
if (this.column.grid.config.tiledKeepBelow) {
|
||||
this.client.kwinClient.keepBelow = !maximized;
|
||||
|
||||
@@ -34,19 +34,25 @@ function initWorkspaceSignalHandlers(world: World) {
|
||||
world.do(() => {}); // re-arrange desktop
|
||||
});
|
||||
|
||||
manager.connect(Workspace.screensChanged, () => {
|
||||
world.do((clientManager, desktopManager) => {
|
||||
desktopManager.updateScreens();
|
||||
})
|
||||
});
|
||||
|
||||
manager.connect(Workspace.activitiesChanged, () => {
|
||||
world.do((clientManager, desktopManager) => {
|
||||
desktopManager.updateActivities();
|
||||
})
|
||||
});
|
||||
|
||||
manager.connect(Workspace.desktopsChanged, () => {
|
||||
world.do((clientManager, desktopManager) => {
|
||||
desktopManager.updateDesktops();
|
||||
})
|
||||
});
|
||||
|
||||
manager.connect(Workspace.activitiesChanged, () => {
|
||||
world.do((clientManager, desktopManager) => {
|
||||
desktopManager.updateActivities();
|
||||
})
|
||||
});
|
||||
|
||||
manager.connect(Workspace.virtualScreenSizeChanged, () => {
|
||||
manager.connect(Workspace.virtualScreenSizeChanged, () => {
|
||||
world.onScreenResized();
|
||||
});
|
||||
|
||||
|
||||
@@ -118,6 +118,11 @@ class ClientManager {
|
||||
if (client === undefined) {
|
||||
return;
|
||||
}
|
||||
if (client.getMaximizedMode() !== MaximizedMode.Unmaximized) {
|
||||
// the client is not really kwin-tiled, just maximized
|
||||
kwinClient.tile = null;
|
||||
return;
|
||||
}
|
||||
client.stateManager.setState(() => new ClientState.Pinned(this.world, this.pinManager, this.desktopManager, kwinClient, this.config), false);
|
||||
this.pinManager.addClient(kwinClient);
|
||||
for (const desktop of this.desktopManager.getDesktopsForClient(kwinClient)) {
|
||||
|
||||
@@ -180,7 +180,7 @@ class ClientWrapper {
|
||||
const manager = new SignalManager();
|
||||
|
||||
manager.connect(client.kwinClient.maximizedAboutToChange, (maximizedMode: MaximizedMode) => {
|
||||
if (maximizedMode > MaximizedMode.Unmaximized && client.kwinClient.tile !== null) {
|
||||
if (maximizedMode !== MaximizedMode.Unmaximized && client.kwinClient.tile !== null) {
|
||||
client.kwinClient.tile = null;
|
||||
}
|
||||
client.maximizedMode = maximizedMode;
|
||||
|
||||
@@ -1,55 +1,76 @@
|
||||
class DesktopManager {
|
||||
// TODO: fix issue with removed and re-added screens
|
||||
|
||||
private readonly pinManager: PinManager;
|
||||
private readonly config: Desktop.Config;
|
||||
public readonly layoutConfig: LayoutConfig;
|
||||
private readonly desktops: Map<string, Desktop>; // key is activityId|desktopId
|
||||
private kwinScreens: Set<Output>;
|
||||
private kwinActivities: Set<string>;
|
||||
private kwinDesktops: Set<KwinDesktop>;
|
||||
|
||||
constructor(pinManager: PinManager, config: Desktop.Config, layoutConfig: LayoutConfig, currentActivity: string, currentDesktop: KwinDesktop) {
|
||||
constructor(
|
||||
pinManager: PinManager,
|
||||
config: Desktop.Config,
|
||||
layoutConfig: LayoutConfig,
|
||||
currentScreen: Output,
|
||||
currentActivity: string,
|
||||
currentDesktop: KwinDesktop
|
||||
) {
|
||||
this.pinManager = pinManager;
|
||||
this.config = config;
|
||||
this.layoutConfig = layoutConfig;
|
||||
this.desktops = new Map();
|
||||
this.kwinScreens = new Set(Workspace.screens);
|
||||
this.kwinActivities = new Set(Workspace.activities);
|
||||
this.kwinDesktops = new Set(Workspace.desktops);
|
||||
this.addDesktop(currentActivity, currentDesktop);
|
||||
this.addDesktop(currentScreen, currentActivity, currentDesktop);
|
||||
}
|
||||
|
||||
public getDesktop(activity: string, kwinDesktop: KwinDesktop) {
|
||||
const desktopKey = DesktopManager.getDesktopKey(activity, kwinDesktop);
|
||||
public getDesktop(screen: Output, activity: string, kwinDesktop: KwinDesktop) {
|
||||
const desktopKey = DesktopManager.getDesktopKey(screen, activity, kwinDesktop);
|
||||
const desktop = this.desktops.get(desktopKey);
|
||||
if (desktop !== undefined) {
|
||||
return desktop;
|
||||
} else {
|
||||
return this.addDesktop(activity, kwinDesktop);
|
||||
return this.addDesktop(screen, activity, kwinDesktop);
|
||||
}
|
||||
}
|
||||
|
||||
public getCurrentDesktop() {
|
||||
return this.getDesktop(Workspace.currentActivity, Workspace.currentDesktop);
|
||||
return this.getDesktop(Workspace.activeScreen, Workspace.currentActivity, Workspace.currentDesktop);
|
||||
}
|
||||
|
||||
public getDesktopInCurrentActivity(kwinDesktop: KwinDesktop) {
|
||||
return this.getDesktop(Workspace.currentActivity, kwinDesktop);
|
||||
return this.getDesktop(Workspace.activeScreen, Workspace.currentActivity, kwinDesktop);
|
||||
}
|
||||
|
||||
public getDesktopForClient(kwinClient: KwinClient) {
|
||||
if (kwinClient.activities.length !== 1 || kwinClient.desktops.length !== 1) {
|
||||
return undefined;
|
||||
}
|
||||
return this.getDesktop(kwinClient.activities[0], kwinClient.desktops[0]);
|
||||
return this.getDesktop(kwinClient.output, kwinClient.activities[0], kwinClient.desktops[0]);
|
||||
}
|
||||
|
||||
private addDesktop(activity: string, kwinDesktop: KwinDesktop) {
|
||||
const desktopKey = DesktopManager.getDesktopKey(activity, kwinDesktop);
|
||||
const desktop = new Desktop(kwinDesktop, this.pinManager, this.config, this.layoutConfig);
|
||||
private addDesktop(screen: Output, activity: string, kwinDesktop: KwinDesktop) {
|
||||
const desktopKey = DesktopManager.getDesktopKey(screen, activity, kwinDesktop);
|
||||
const desktop = new Desktop(screen, kwinDesktop, this.pinManager, this.config, this.layoutConfig);
|
||||
this.desktops.set(desktopKey, desktop);
|
||||
return desktop;
|
||||
}
|
||||
|
||||
private static getDesktopKey(activity: string, kwinDesktop: KwinDesktop) {
|
||||
return activity + "|" + kwinDesktop.id;
|
||||
private static getDesktopKey(screen: Output, activity: string, kwinDesktop: KwinDesktop) {
|
||||
return screen.name + "|" + activity + "|" + kwinDesktop.id;
|
||||
}
|
||||
|
||||
public updateScreens() {
|
||||
const newScreens = new Set(Workspace.screens);
|
||||
for (const screen of this.kwinScreens) {
|
||||
if (!newScreens.has(screen)) {
|
||||
this.removeScreen(screen);
|
||||
}
|
||||
}
|
||||
this.kwinScreens = newScreens;
|
||||
}
|
||||
|
||||
public updateActivities() {
|
||||
@@ -72,20 +93,32 @@ class DesktopManager {
|
||||
this.kwinDesktops = newDesktops;
|
||||
}
|
||||
|
||||
private removeScreen(kwinScreen: Output) {
|
||||
for (const activity of this.kwinActivities) {
|
||||
for (const kwinDesktop of this.kwinDesktops) {
|
||||
this.destroyDesktop(kwinScreen, activity, kwinDesktop);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private removeActivity(activity: string) {
|
||||
for (const kwinDesktop of this.kwinDesktops) {
|
||||
this.destroyDesktop(activity, kwinDesktop);
|
||||
for (const kwinScreen of this.kwinScreens) {
|
||||
for (const kwinDesktop of this.kwinDesktops) {
|
||||
this.destroyDesktop(kwinScreen, activity, kwinDesktop);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private removeKwinDesktop(kwinDesktop: KwinDesktop) {
|
||||
for (const activity of this.kwinActivities) {
|
||||
this.destroyDesktop(activity, kwinDesktop);
|
||||
for (const kwinScreen of this.kwinScreens) {
|
||||
for (const activity of this.kwinActivities) {
|
||||
this.destroyDesktop(kwinScreen, activity, kwinDesktop);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private destroyDesktop(activity: string, kwinDesktop: KwinDesktop) {
|
||||
const desktopKey = DesktopManager.getDesktopKey(activity, kwinDesktop);
|
||||
private destroyDesktop(screen: Output, activity: string, kwinDesktop: KwinDesktop) {
|
||||
const desktopKey = DesktopManager.getDesktopKey(screen, activity, kwinDesktop);
|
||||
const desktop = this.desktops.get(desktopKey);
|
||||
if (desktop !== undefined) {
|
||||
desktop.destroy();
|
||||
@@ -106,20 +139,23 @@ class DesktopManager {
|
||||
}
|
||||
|
||||
public getDesktopsForClient(kwinClient: KwinClient) {
|
||||
const desktops = this.getDesktops(kwinClient.activities, kwinClient.desktops); // workaround for QTBUG-109880
|
||||
const desktops = this.getDesktops([kwinClient.output], kwinClient.activities, kwinClient.desktops); // workaround for QTBUG-109880
|
||||
return desktops;
|
||||
}
|
||||
|
||||
// empty array means all
|
||||
public *getDesktops(activities: string[], kwinDesktops: KwinDesktop[]) {
|
||||
public *getDesktops(screens: Output[], activities: string[], kwinDesktops: KwinDesktop[]) {
|
||||
const matchedScreens = screens.length > 0 ? screens : this.kwinScreens.keys();
|
||||
const matchedActivities = activities.length > 0 ? activities : this.kwinActivities.keys();
|
||||
const matchedDesktops = kwinDesktops.length > 0 ? kwinDesktops : this.kwinDesktops.keys();
|
||||
for (const matchedActivity of matchedActivities) {
|
||||
for (const matchedDesktop of matchedDesktops) {
|
||||
const desktopKey = DesktopManager.getDesktopKey(matchedActivity, matchedDesktop);
|
||||
const desktop = this.desktops.get(desktopKey);
|
||||
if (desktop !== undefined) {
|
||||
yield desktop;
|
||||
for (const matchedScreen of matchedScreens) {
|
||||
for (const matchedActivity of matchedActivities) {
|
||||
for (const matchedDesktop of matchedDesktops) {
|
||||
const desktopKey = DesktopManager.getDesktopKey(matchedScreen, matchedActivity, matchedDesktop);
|
||||
const desktop = this.desktops.get(desktopKey);
|
||||
if (desktop !== undefined) {
|
||||
yield desktop;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
class PinManager {
|
||||
// TODO: per-screen
|
||||
|
||||
private readonly pinnedClients: Set<KwinClient>;
|
||||
|
||||
constructor() {
|
||||
|
||||
@@ -49,6 +49,7 @@ class World {
|
||||
clamper: config.scrollingLazy ? new EdgeClamper() : new CenterClamper(),
|
||||
},
|
||||
layoutConfig,
|
||||
Workspace.activeScreen,
|
||||
Workspace.currentActivity,
|
||||
Workspace.currentDesktop,
|
||||
);
|
||||
|
||||
@@ -61,7 +61,7 @@ namespace ClientState {
|
||||
[] :
|
||||
union(oldDesktops, kwinClient.desktops);
|
||||
world.do((clientManager, desktopManager) => {
|
||||
for (const desktop of desktopManager.getDesktops(kwinClient.activities, changedDesktops)) {
|
||||
for (const desktop of desktopManager.getDesktops([kwinClient.output], kwinClient.activities, changedDesktops)) {
|
||||
desktop.onPinsChanged();
|
||||
}
|
||||
});
|
||||
@@ -73,13 +73,21 @@ namespace ClientState {
|
||||
[] :
|
||||
union(oldActivities, kwinClient.activities);
|
||||
world.do((clientManager, desktopManager) => {
|
||||
for (const desktop of desktopManager.getDesktops(changedActivities, kwinClient.desktops)) {
|
||||
for (const desktop of desktopManager.getDesktops([kwinClient.output], changedActivities, kwinClient.desktops)) {
|
||||
desktop.onPinsChanged();
|
||||
}
|
||||
});
|
||||
oldActivities = kwinClient.activities;
|
||||
});
|
||||
|
||||
manager.connect(kwinClient.outputChanged, () => {
|
||||
world.do((clientManager, desktopManager) => {
|
||||
for (const desktop of desktopManager.getDesktops([kwinClient.output], kwinClient.activities, kwinClient.desktops)) {
|
||||
desktop.onPinsChanged();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
return manager;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user