Do decorated windows' title bars not work correctl...
# jewel
f
Do decorated windows' title bars not work correctly on Windows? They don't seem to receive any input at all despite working fine on Linux
d
hmmm that is weird. Could you please file a bug report on YT please? Then we can take some time to figure out what might be happening 😄
k
Is this running in a virtual machine?
s
Looks like RDP which may be doing weird stuff. In my experience it works just fine on Windows 11.
Note that we don't support anything other than JBR 25 so if you're using anything else as JVM that may also be the issue
☝️ 1
f
A friend of mine tried running it on his Windows 11 installation and it similarly didn't work, it crashes outright if you try to use DecoratedWindow in a non-JBR environment
d
Hmmm I guess that's the problem then. In the DecoratedWindow KDoc, we do talk about the need for JBR:
Copy code
* A Compose window with custom JetBrains Runtime (JBR) window decorations, including support for a custom [TitleBar].
 * Requires the application to run on JetBrains Runtime; an error is thrown at runtime if JBR is not available.
github.com/JetBrains/intellij-community/blob/…/DecoratedWindow.kt#…
f
No, he was using JBR and it ran fine, it just had the same undraggable problem
🤔 1
s
Can you please file a bug? This may be a new regression since it used to work fine until recently, last I tried
f
It appears to be a me problem because
Copy code
package dev.fishies.barreleye

import androidx.compose.ui.window.application
import org.jetbrains.jewel.ui.component.ActionButton
import org.jetbrains.jewel.ui.component.Text
import org.jetbrains.jewel.window.DecoratedWindow
import org.jetbrains.jewel.window.TitleBar
import org.jetbrains.jewel.window.styling.DecoratedWindowColors
import org.jetbrains.jewel.window.styling.DecoratedWindowStyle
import org.jetbrains.jewel.window.styling.TitleBarColors
import org.jetbrains.jewel.window.styling.TitleBarStyle
import org.jetbrains.jewel.window.styling.*
import org.jetbrains.jewel.intui.standalone.theme.IntUiTheme
import org.jetbrains.jewel.intui.standalone.theme.darkThemeDefinition
import org.jetbrains.jewel.intui.standalone.theme.default
import org.jetbrains.jewel.foundation.theme.JewelTheme
import org.jetbrains.jewel.ui.ComponentStyling
import org.jetbrains.jewel.intui.window.decoratedWindow
import org.jetbrains.jewel.ui.component.*
import org.jetbrains.jewel.foundation.*
import org.jetbrains.jewel.intui.window.styling.dark
import org.jetbrains.jewel.intui.window.styling.light

fun main() = application {
IntUiTheme(
    theme = JewelTheme.darkThemeDefinition(),
    styling = ComponentStyling.default().decoratedWindow(
        titleBarStyle = TitleBarStyle.light()
    ),
) {
    DecoratedWindow(::exitApplication) {
        TitleBar {
            Text("Hi")
        }

        ActionButton({}) {
            Text("Hi!")
        }
    }
}
}
works fine (excuse the bad formatting, this was done in notepad in my VM). I'll have to try to narrow down what I'm doing wrong later
s
Huh, thanks for looking into it. If you do find out what's going on do let us know — at the very least we can try and document an anti-pattern