Treat first frame after redirection differently

Because first frame no window has their pixmap bound, which doesn't
happen in frames after the first. If a window is unmapped in that frame,
the compositor will try to render a window with no pixmap bound if
fading is enabled.

Now we keep track if we are in the first frame, and if that's the case
we skip fading in unmap/destroy.

Fixes #239, bug number 2

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
Yuxuan Shui
2019-09-29 00:11:32 +01:00
parent f493447b33
commit a69ed89114
2 changed files with 18 additions and 0 deletions

View File

@ -210,6 +210,8 @@ typedef struct session {
#endif
/// Sync fence to sync draw operations
xcb_sync_fence_t sync_fence;
/// Whether we are rendering the first frame after screen is redirected
bool first_frame;
// === Operation related ===
/// Flags related to the root window