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
16.33k stars 1.18k forks source link

Skipping frames while resizing a transparent window #4153

Closed GazimSoliev closed 2 months ago

GazimSoliev commented 10 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 10 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 10 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 10 months ago

and yeah, it's so laggy (glitch)

dima-avdeev-jb commented 10 months ago

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

GazimSoliev commented 7 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

okushnikov commented 4 months ago

Please check the following ticket on YouTrack for follow-ups to this issue. GitHub issues will be closed in the coming weeks.