6 Commits
v0.9 ... v0.9.1

Author SHA1 Message Date
Peter Fajdiga
20a3ece4b5 bump version to 0.9.1 2024-04-06 08:36:51 +02:00
Peter Fajdiga
3cad8102ee qt.d.ts: remove QByteArray type 2024-04-05 14:49:36 +02:00
Peter Fajdiga
7fd45eed8f kwin.d.ts: mark cursorPos and minSize as immutable 2024-04-05 14:48:56 +02:00
Peter Fajdiga
7299341608 Tiled: use clientGeometry to determine border resize 2024-04-05 14:46:19 +02:00
Peter Fajdiga
842ec1ac63 WindowRuleEnforcer: fix bug in joinRegexes 2024-04-05 13:58:50 +02:00
Peter Fajdiga
0523465b84 WindowRuleEnforcer: remove debug logs 2024-04-01 19:26:50 +02:00
5 changed files with 9 additions and 13 deletions

View File

@@ -9,7 +9,7 @@
"Name": "Peter Fajdiga" "Name": "Peter Fajdiga"
}], }],
"Id": "karousel", "Id": "karousel",
"Version": "0.9", "Version": "0.9.1",
"License": "GPLv3", "License": "GPLv3",
"Website": "https://github.com/peterfajdiga/karousel", "Website": "https://github.com/peterfajdiga/karousel",
"BugReportUrl": "https://github.com/peterfajdiga/karousel/issues" "BugReportUrl": "https://github.com/peterfajdiga/karousel/issues"

View File

@@ -9,7 +9,7 @@ declare const Workspace: {
readonly currentActivity: string; readonly currentActivity: string;
readonly activeScreen: Output; readonly activeScreen: Output;
readonly windows: KwinClient[]; readonly windows: KwinClient[];
readonly cursorPos: QmlPoint; readonly cursorPos: Readonly<QmlPoint>;
activeWindow: KwinClient; activeWindow: KwinClient;
@@ -49,9 +49,10 @@ type Output = unknown;
interface KwinClient { interface KwinClient {
readonly shadeable: boolean; readonly shadeable: boolean;
readonly caption: string; readonly caption: string;
readonly minSize: QmlSize; readonly minSize: Readonly<QmlSize>;
readonly transient: boolean; readonly transient: boolean;
readonly transientFor: KwinClient; readonly transientFor: KwinClient;
readonly clientGeometry: Readonly<QmlRect>;
readonly move: boolean; readonly move: boolean;
readonly resize: boolean; readonly resize: boolean;
readonly moveable: boolean; readonly moveable: boolean;
@@ -59,7 +60,7 @@ interface KwinClient {
readonly fullScreenable: boolean; readonly fullScreenable: boolean;
readonly maximizable: boolean; readonly maximizable: boolean;
readonly output: Output; readonly output: Output;
readonly resourceClass: QByteArray; readonly resourceClass: string;
readonly dock: boolean; readonly dock: boolean;
readonly normalWindow: boolean; readonly normalWindow: boolean;
readonly managed: boolean; readonly managed: boolean;

2
src/extern/qt.d.ts vendored
View File

@@ -11,8 +11,6 @@ declare const Qt: {
type QmlObject = unknown; type QmlObject = unknown;
type QByteArray = string;
type QmlPoint = { type QmlPoint = {
x: number; x: number;
y: number; y: number;

View File

@@ -5,9 +5,6 @@ class WindowRuleEnforcer {
constructor(windowRules: WindowRule[]) { constructor(windowRules: WindowRule[]) {
const [floatRegex, tileRegex, followCaptionRegex] = WindowRuleEnforcer.createWindowRuleRegexes(windowRules); const [floatRegex, tileRegex, followCaptionRegex] = WindowRuleEnforcer.createWindowRuleRegexes(windowRules);
log("floatRegex", floatRegex);
log("tileRegex", tileRegex);
log("followCaptionRegex", followCaptionRegex);
this.preferFloating = new ClientMatcher(floatRegex); this.preferFloating = new ClientMatcher(floatRegex);
this.preferTiling = new ClientMatcher(tileRegex); this.preferTiling = new ClientMatcher(tileRegex);
this.followCaption = followCaptionRegex; this.followCaption = followCaptionRegex;
@@ -81,11 +78,11 @@ class WindowRuleEnforcer {
} }
if (regexes.length === 1) { if (regexes.length === 1) {
return new RegExp("^" + regexes[0] + "$"); return new RegExp("^(" + regexes[0] + ")$");
} }
const joinedRegexes = regexes.map(WindowRuleEnforcer.wrapParens).join("|"); const joinedRegexes = regexes.map(WindowRuleEnforcer.wrapParens).join("|");
return new RegExp("^" + joinedRegexes + "$"); return new RegExp("^(" + joinedRegexes + ")$");
} }
private static wrapParens(str: string) { private static wrapParens(str: string) {

View File

@@ -82,8 +82,8 @@ namespace ClientState {
if (kwinClient.resize) { if (kwinClient.resize) {
resizing = true; resizing = true;
resizingBorder = Workspace.cursorPos.x > kwinClient.frameGeometry.right || resizingBorder = Workspace.cursorPos.x > kwinClient.clientGeometry.right ||
Workspace.cursorPos.x < kwinClient.frameGeometry.left; Workspace.cursorPos.x < kwinClient.clientGeometry.left;
window.column.grid.onUserResizeStarted(); window.column.grid.onUserResizeStarted();
} }
}); });