mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-11-17 22:33:12 +01:00
feat(wm): transparency for the windows without the focus
The window in front of every container is see-through, unless its container has the focus on the focused monitor, so that the window being worked in stands out. The opacity of a window is a property KWin has: komorebi sets it through the bridge, as a fraction of 255, and KWin draws the window so. The window manager keeps the opacity it gave each window and, after every event and message, sends only the difference, makes a window opaque again when it should no longer be see-through, and makes every one opaque when it stops. Windows an ignore rule covers, and workspaces that do not tile, are left as they are. The patched border effect already draws a window again when its opacity changes, so the border follows it. komorebic gets transparency, transparency-alpha and toggle-transparency, and the state of the daemon says what the settings are. vm-features checks the pixels in the middle of a focused window and of one that is not. A monocled window is opaque on the focused monitor and see-through on another. komorebi.json takes transparency, transparency_alpha and transparency_ignore_rules.
This commit is contained in:
1 parent
abfa8c6a5c
commit
fa1e822e44
36 files changed
+974
-30
No files matched your search
@@ -460,6 +460,15 @@ one of Qt's curves, and is drawn as an ease out, the kind of curve a window movi
|
||||
wants. The stock Geometry Change has one curve, an exponential ease out, so komorebi's build of
|
||||
it reads a `Curve` setting ([PLATFORM.md](PLATFORM.md#the-patches)).
|
||||
|
||||
## Why does the window manager keep the opacity it gave each window?
|
||||
|
||||
So that the backend is told only what changed. `transparency_manager::apply`
|
||||
([`transparency_manager.rs`](../../komorebi/src/transparency_manager.rs)) is called after every
|
||||
event and every message, and most of them change no window's opacity: the window manager keeps
|
||||
the opacity it gave each window that is not opaque (`WindowManager::opacity_applied`), sends the
|
||||
difference, makes a window opaque again when it should no longer be see-through (and only if it is
|
||||
still there), and makes every one opaque when it stops.
|
||||
|
||||
## Why are the effects patched?
|
||||
|
||||
Because the stock effects lack what komorebi needs of them. Each patch leaves the effect
|
||||
|
||||
Reference in new issue
Block a user