compose-multiplatform icon indicating copy to clipboard operation
compose-multiplatform copied to clipboard

`Modifier.pointerIcon` implementation conflicts with manual setting cursor via `ComposeWindow.cursor`

Open igordmn opened this issue 4 years ago • 1 comments

Compose 1.0.0-alpha2.

After we implemented Modifier.pointerIcon, we lost ability to override cursor with the help of Swing:

import androidx.compose.runtime.LaunchedEffect
import androidx.compose.ui.window.singleWindowApplication
import java.awt.Cursor

fun main() = singleWindowApplication {
    LaunchedEffect(Unit) {
        window.cursor = Cursor(Cursor.CROSSHAIR_CURSOR)
    }
}

Because of this we don't have resizable cursor with Window(undecorated=true, resizable=true, ...) and in SplitPane component.

The second one fixes trivially (using Modifier.pointerIcon), but I was not able to fix the first one. because we don't use Composable functions there.

We should figure out how can we fix this - either we don't support Swing interop for cursor changing, or implement Modifier.pointerIcon differently

igordmn avatar Aug 04 '21 13:08 igordmn

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

okushnikov avatar Aug 26 '24 17:08 okushnikov