Skip to content

[macOS] getTrayWindowPosition() does not work on external screens #349

@toBYTEas

Description

@toBYTEas

When positioning my compose window next to the tray using getTrayWindowPosition() it works on different spaces, but not on external screens.

fun main() {
    application {
        val windowWidth = 440
        val windowHeight = 670
        val tray = getTrayWindowPosition(windowWidth, windowHeight)

        val windowState = WindowState(
            width = windowWidth.dp,
            height = windowHeight.dp,
            position = WindowPosition(
                tray.x,
                tray.y
            )
        )
        Window(
            state = windowState,
        ) {
        // Content
        }
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions