Skip to content

Use JBR API to implement WindowDraggableArea when possible#2674

Merged
Alexander Maryanovsky (m-sasha) merged 2 commits into
jb-mainfrom
m-sasha/use-jbr-api-for-window-drag
Jan 13, 2026
Merged

Use JBR API to implement WindowDraggableArea when possible#2674
Alexander Maryanovsky (m-sasha) merged 2 commits into
jb-mainfrom
m-sasha/use-jbr-api-for-window-drag

Conversation

@m-sasha

@m-sasha Alexander Maryanovsky (m-sasha) commented Jan 9, 2026

Copy link
Copy Markdown

Implement WindowDraggableArea via JBR API when available to improve (typically) undecorated window dragging experience on Linux.

Trying on Ubuntu 24.04:

  • Windows snap to screen edges.
  • Windows can be dragged (partially) outside the screen.
  • Windows can be made full-screen by dragging them to the top of the screen.

Fixes https://youtrack.jetbrains.com/issue/CMP-7793/Use-JBR-API-in-WindowDraggableArea-on-Linux

Testing

Tested on Ubuntu 24.04 with

fun main() = singleWindowApplication(
    undecorated = true
) {
    MaterialTheme(
        colors = if (isSystemInDarkTheme()) darkColors() else lightColors()
    ) {
        Column(Modifier.fillMaxSize()) {
            WindowDraggableArea(Modifier.fillMaxWidth().background(Color.LightGray)) {
                Box(Modifier.fillMaxWidth().padding(4.dp), contentAlignment = Alignment.Center) {
                    Text("Draggable Window")
                }
            }
            Surface(Modifier.fillMaxWidth().weight(1f)) {}
        }
    }
}

Release Notes

Features - Desktop

  • [Linux] Improve window dragging experience when using WindowDraggableArea on Linux with JetBrains Runtime.

Comment thread compose/foundation/foundation/build.gradle Outdated
@m-sasha Alexander Maryanovsky (m-sasha) merged commit 6a63c9e into jb-main Jan 13, 2026
16 checks passed
@m-sasha Alexander Maryanovsky (m-sasha) deleted the m-sasha/use-jbr-api-for-window-drag branch January 13, 2026 11:58
Igor Demin (igordmn) added a commit that referenced this pull request Jan 14, 2026
Igor Demin (igordmn) added a commit that referenced this pull request Jan 14, 2026
Igor Demin (igordmn) added a commit that referenced this pull request Jan 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants