mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-12-01 20:54:11 +01:00
feat(wm): a window the user maximizes
KWin maximizes a window for the user as well as for komorebi: the title bar, a double click and a shortcut do it, and nobody asks the window manager. A window that stayed a tile would be asked to move at the next retile, so komorebi has to know. The bridge reports KWin's maximizedChanged as a maximized event, true only when the window is maximized both ways. The table turns it into a MaximizeChange, and adopt_maximize_change takes the window out of the layout as toggle-maximize does, or, when the user restores it, puts it back in a container of its own at the index it came from. A window that is already maximized when komorebi starts, or that opens maximized, is the workspace's maximized window from the start. komorebi's own maximize is reported too and finds the workspace as it left it, so it changes nothing. While a window is maximized, what is asked of the layout does nothing, by the same rule as for toggle-maximize. A maximized window of a monitor that is unplugged goes to the monitor that is left and stays maximized: evacuate_monitor makes it the maximized window of the workspace it goes to, and the maximized window that workspace had goes back to its tile. Until now it came back as a tile. vm-user-maximize maximizes windows with kdotool in a headless KWin, and checks the daemon's state, the frames, that the layout commands do nothing, and that toggle-maximize and the user's restore both put the window back in its tile.
This commit is contained in:
1 parent
0210ec285a
commit
d6ad3b4292
31 files changed
+1246
-88
No files matched your search
@@ -121,8 +121,9 @@ the run.
|
||||
- `Kde.session(machine, scale=)` attaches to the session node's own Plasma
|
||||
session once its desktop is up, and `shot(name)` returns a screenshot as a
|
||||
Pillow image, keeping `NAME.png` in the output directory.
|
||||
- `activate`, `minimize` and `close` act on a window through `kdotool`, as the
|
||||
user would, and `wid_by_class` finds a window by its app id or X11 class.
|
||||
- `activate`, `minimize`, `maximize`, `unmaximize` and `close` act on a window through
|
||||
`kdotool`, as the user would (`maximize` does what the title bar's button does, and the
|
||||
daemon is not asked), and `wid_by_class` finds a window by its app id or X11 class.
|
||||
`Kde.headless(..., xwayland=True)` gives the session XWayland, for X11
|
||||
clients.
|
||||
- `start_komorebi(*args)` starts the daemon in the session, with the module's
|
||||
|
||||
Reference in new issue
Block a user