JetBrains / compose-multiplatform

Compose Multiplatform, a modern UI framework for Kotlin that makes building performant and beautiful user interfaces easy and enjoyable.
https://jetbrains.com/lp/compose-multiplatform
Apache License 2.0
15.36k stars 1.12k forks source link

Skipping frames while resizing a transparent window #4153

Open GazimSoliev opened 5 months ago

GazimSoliev commented 5 months ago

Describe the bug Skipping frames while resizing a transparant window

Affected platforms Select one of the platforms below:

Versions

To Reproduce

import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.material.Surface
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.window.Window
import androidx.compose.ui.window.application

fun main() = application {
    Window(onCloseRequest = ::exitApplication, title = "Window", undecorated = true, transparent = true) {
        Surface(color = Color.Green, modifier = Modifier.fillMaxSize()) { }
    }
}

Expected behavior Without skipping frames while resizing

dima-avdeev-jb commented 5 months ago

Made reproducible sample here: https://github.com/dima-avdeev-jb/issue-4153 Tested on Manjaro Linux, and found some janks while resizing.

@GazimSoliev Can you please recoed a video for better understanding?

GazimSoliev commented 5 months ago

I tried recorded, screenrecorder can't catch that cuz of bitrate, but in reality compose skips 1-2 frames while resizing that makes window invisible, espaseally hard UI window

GazimSoliev commented 5 months ago

and yeah, it's so laggy (glitch)

dima-avdeev-jb commented 5 months ago

On my Manjaro Linux I haven't encountered any problems with the invisible window.

GazimSoliev commented 3 months ago

On my Manjaro Linux I haven't encountered any problems with the invisible window.

I noticed this in XORG session, it doesn't exist in Wayland