compose-multiplatform
compose-multiplatform copied to clipboard
`Modifier.pointerIcon` implementation conflicts with manual setting cursor via `ComposeWindow.cursor`
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
Please check the following ticket on YouTrack for follow-ups to this issue. GitHub issues will be closed in the coming weeks.