mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-11-18 22:58:34 +01:00
feat(kwin): animation through the Geometry Change effect
Windows that jump to their new places are hard to follow. komorebi animates nothing itself: KWin's Geometry Change effect animates a window that a script moves, and komorebi tells it how long that takes. The look the window manager asks the backend for now has an animation, a duration that the settings give for every kind of animation or, when one is set for the movement of windows, for that one. The KWin backend writes the effect's settings into the user's kwinrc (a duration, and no cross-fading, since a window going to its place changes where it is and not what it shows), loads the effect when animation is on, and unloads it and puts the settings back when it is off or komorebi exits. komorebic gets animation, animation-duration and animation-fps. The module installs the effect (effects.animation), and the session node sets the variable that makes KWin load effects that animate under software rendering. vm-look reads the screen a moment after a flip of the layout, with a 30 s animation and without one. The commands that change a stack turn the animation off while they run, as komorebi does elsewhere, and komorebi.json takes an animation key (enabled, duration and fps, each for every kind of animation or for one).
This commit is contained in:
1 parent
22c14ba5be
commit
4fa8108110
41 files changed
+1322
-93
No files matched your search
+18
-1
@@ -390,7 +390,8 @@ then, and KDE Rounded Corners at its defaults draws a one pixel black outline ov
|
||||
bar of every window. Built with `EnabledByDefault` false, an effect is loaded only when
|
||||
something asks for it with `loadEffect`, which can come after its settings are written. That
|
||||
KWin then starts without the effect and loads it when asked was measured before the package
|
||||
was written ([PLATFORM.md](PLATFORM.md#kwin-effects)).
|
||||
was written ([PLATFORM.md](PLATFORM.md#kwin-effects)). Geometry Change ships disabled by
|
||||
default, and its check asserts it, so that an update of the effect cannot change it unseen.
|
||||
|
||||
## Why does the compositor draw the borders, and not komorebi?
|
||||
|
||||
@@ -434,6 +435,22 @@ active window" and "the others". komorebi's build of KDE Rounded Corners takes a
|
||||
window over D-Bus, through KWin's name ([PLATFORM.md](PLATFORM.md#the-patches)). Without that
|
||||
build every kind falls back to the two colors of the look, and komorebi says so once in its log.
|
||||
|
||||
## Why does komorebi animate nothing itself?
|
||||
|
||||
Because the compositor draws the windows: an animation komorebi made would be a series of frames
|
||||
asked of KWin, each a command, where the Geometry Change effect animates what is painted, in the
|
||||
compositor, at the refresh rate of the screen. komorebi tells the effect how long an animation
|
||||
lasts ([`border_manager::current_look`](../../komorebi/src/border_manager/mod.rs)). That is why
|
||||
`animation-fps` is accepted and does nothing, and why the frame KWin reports for a window is the
|
||||
final one from the start of the animation: the effect moves what is painted and not the window
|
||||
([PLATFORM.md](PLATFORM.md#kwin-effects)).
|
||||
|
||||
## Why is cross-fading off?
|
||||
|
||||
Because cross-fading the old contents of a window into the new while it changes size is the
|
||||
effect's default, and it costs a redraw of both. A window going to its place is a move and a
|
||||
resize, and what the window shows does not change.
|
||||
|
||||
## 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