JetBrains / jewel

An implementation of the IntelliJ look and feels in Compose for Desktop
Apache License 2.0
636 stars 30 forks source link

Dragging on the TitleBar to move the window does not always work #368

Open hvisser opened 2 months ago

hvisser commented 2 months ago

Dragging the TitleBar doesn't always work, at least on macOS with jbr-17 and jbr-21. When I use a normal Window the window can be dragged normally. Since TitleBar is delegating the hit test to the JetBrains runtime, this might also be a runtime bug.

https://github.com/JetBrains/jewel/assets/866834/e504719b-d70e-46ba-bb4e-3d2522920b78

rock3r commented 2 months ago

Hugo, can you confirm this isn't by any chance happening when clicking clickable/focusable components? This doesn't seem to be the case in the video, but just to be sure.

hvisser commented 2 months ago

I've also tested this with an completely empty window, so it doesn't seem to be related to focus I think.

rock3r commented 2 months ago

Thanks :) @devkanro have you ever seen this?

devkanro commented 2 months ago

This is a known issue, and I have no idea currently, will look into this, but I think it is a JBR issue.

hvisser commented 2 months ago

The pointer is handled here https://github.com/JetBrains/jewel/blob/main/decorated-window/src/main/kotlin/org/jetbrains/jewel/window/TitleBar.Windows.kt#L43 and it looks OK, but maybe the actual pointer event does not always get delivered to the window decoration correctly?

FWIW I assume that Intellij and other products do something similar but using Swing API's and I'm not observing that issue with those products.