Organize files into folders, move some code around. Remove unnecessary
`#include`s. And fix some missing copyright declarations.
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
Remove transitional window states, such as UNMAPPING, MAPPING, etc. We
are trying to generialize animation, keeping all those states for
animation/fading will only make things more complicated. Instead the
window state now exactly reflect how the window is to the X server, and
we check the animatable states to determine the animation progress.
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
The window flags are used for delaying updates until we have grabbed the
X server. This is to make sure our internal states are in sync with the
server's state, to avoid race conditions.
Since shadow state is purely internal to picom, there is no need for
delaying its update, and thus these flags can be removed.
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
If a window receives multiple configure notifies in between 2 frames, we
add all the in between positions into damage, when we really just need
the starting and the end position.
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
Part of the configure notify handling which requires querying the X
server, has been moved into the X critical section.
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
Instead of handling reparent notify on the spot by updating the client
windows, setup a flag on the window and call win_recheck_client later.
This makes handling of complex scenarios easier. As example, see the
case in issue #299.
Note this is not a complete fix for #299
* Add new field `opacity_target_old` to `struct managed_win` for
tracking relevant `opacity_target` changes.
* Smoothly fade blur-texture opacity on window opacity changes (based on
window opacity), when the window was or will be fully transparent
(`w->opacity ~< 0.004`).
* Fixed alpha-clipping of the blur-texture when using `inactive-opacity` or
repeatedly setting window opacity with large fade intervals (should fix#314).
These two flags are intended for subtly different things. I can probably
justify the distinction, but it's definitely difficult to explain. And
there is no obvious benefits to keep them separate.
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
And a window update flag for mapping the window.
Also make sure related functions consider the case where the given window
has pending updates.
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
Split it into PIXMAP_STALE and SHADOW_STALE, this allows us to update
pixmaps and shadow images separately.
Also added PIXMAP_NONE and SHADOW_NONE, as redundancy to detect logic
errors.
Convenient constants and functions are provided for updating pixmap and
shadow together.
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>