feat: adding support for changing the size of windows during window resize events to aerospike. Also cleaning up imports and simplifying some of the settings logic.
Build and Test / build (pull_request) Successful in 23s
Build and Test / release (pull_request) Has been skipped

This commit is contained in:
Lucas Oskorep
2026-02-25 11:33:12 -05:00
parent 3d2da0a4bc
commit 4be7602316
8 changed files with 388 additions and 409 deletions
+8 -7
View File
@@ -1,20 +1,21 @@
import GLib from "gi://GLib";
export type QueuedEvent = {
name: string;
callback: () => void;
}
const queuedEvents: QueuedEvent[] = [];
const pendingEvents: Map<string, QueuedEvent> = new Map();
export default function queueEvent(event: QueuedEvent, interval = 200) {
queuedEvents.push(event);
pendingEvents.set(event.name, event);
GLib.timeout_add(GLib.PRIORITY_DEFAULT, interval, () => {
const e = queuedEvents.pop()
if (e) {
const e = pendingEvents.get(event.name);
if (e && e === event) {
pendingEvents.delete(event.name);
e.callback();
}
return queuedEvents.length !== 0;
return GLib.SOURCE_REMOVE;
});
}
}