mirror of
https://github.com/DeeJanuz/frametop.git
synced 2026-10-06 03:00:06 +02:00
Profiles: fixes from trying them on the live desktop
- KWin 6.2's scripts have no maximize mode: a window counts as maximized when it fills its output's maximize area. - A late event for a window that just closed brought it back into ft-floatd's table, so a profile "found" it open, floated a window that no longer existed, and held a slot. The script doesn't report deleted windows, and ft-floatd ignores events for ids it has seen close. - Docking a window that came from a screen that's hidden now puts it on the first screen that shows instead. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
858dbe1562
commit
a699540d95
3 files changed
+27
-3
No files matched your search
+10
-1
@@ -48,11 +48,20 @@ function info(w) {
|
||||
frame: rect(w.frameGeometry), client: rect(w.clientGeometry), popup: w.popupWindow,
|
||||
transient: w.transient, parent: w.transientFor ? String(w.transientFor.internalId) : "",
|
||||
normal: w.normalWindow, dialog: w.dialog, fullScreen: w.fullScreen, minimized: w.minimized,
|
||||
onAllDesktops: w.onAllDesktops, maximized: w.maximizeMode === 3
|
||||
onAllDesktops: w.onAllDesktops, maximized: isMaximized(w)
|
||||
};
|
||||
}
|
||||
|
||||
// KWin 6.2's scripts have no maximize mode to read: a window is maximized when it fills its
|
||||
// output's maximize area.
|
||||
function isMaximized(w) {
|
||||
if (!w.normalWindow || !w.output) return false;
|
||||
const a = workspace.clientArea(KWin.MaximizeArea, w), g = w.frameGeometry;
|
||||
return g.x === a.x && g.y === a.y && g.width === a.width && g.height === a.height;
|
||||
}
|
||||
|
||||
function report(type, w) {
|
||||
if (w.deleted) return; // a window on its way out still changes output and size
|
||||
const ev = info(w);
|
||||
ev.ev = type;
|
||||
send(ev);
|
||||
|
||||
Reference in new issue
Block a user