Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
20a3ece4b5 | ||
|
|
3cad8102ee | ||
|
|
7fd45eed8f | ||
|
|
7299341608 | ||
|
|
842ec1ac63 | ||
|
|
0523465b84 |
@@ -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"
|
||||||
|
|||||||
7
src/extern/kwin.d.ts
vendored
7
src/extern/kwin.d.ts
vendored
@@ -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
2
src/extern/qt.d.ts
vendored
@@ -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;
|
||||||
|
|||||||
@@ -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) {
|
||||||
|
|||||||
@@ -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();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user