-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dragging on the TitleBar to move the window does not always work #368
Comments
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. |
I've also tested this with an completely empty window, so it doesn't seem to be related to focus I think. |
Thanks :) @devkanro have you ever seen this? |
This is a known issue, and I have no idea currently, will look into this, but I think it is a JBR issue. |
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. |
pretty sure this issue existed on windows as well, using latest 243 with jbr21, still sadly existed :( |
@devkanro any chance you could look into this? |
This issue significantly impacts usability, and I hope this gets prioritized for a fix soon. |
I hope @devkanro will come back to help with this; they're the only person who's got knowledge on the topic |
Here's my input to this issue: The Suggestion In my first tests I can fix everything if I make it simple: just enable drag&drop and double click resize in the region of the title text and not on the full title bar - this means I apply jewel/decorated-window/src/main/kotlin/org/jetbrains/jewel/window/TitleBar.Windows.kt Line 43 in 7aba563
forceHitTest at all...
If this is something that would be an acceptable solution for all, I can beautify my quick work around and make a pull request. It's not perfect though, but for me, it's good enough (at least better than what is not) |
Thanks for the investigation @MFlisar — any chance you can do a quick PR with the change? We're in the process of moving everything into the JetBrains/intellij-community repo, but we'll cherry pick all approved PRs from here in the meantime |
I will do that. I even have good news - when I remove the hierarchy and place a background The PR is here: #731 |
Awesome news, thanks a lot! We appreciate it 🙏 |
I'll review the PR tomorrow, I'm AFK until then |
The PR was related to another bug, not this one. There was some confusion on my side. Sorry everyone. I have looked into this issue a bit with folks from the Compose Multiplatform team and we (they!) have identified a root cause:
Given we don't want to change how Compose handles events due to obvious compatibility reasons, we need a workaround for this problem. Luckily, we found this should work:
We'll get to doing this as soon as possible — but that may be "at some point in Q1 2025" as we're both overloaded and about to go on vacation :) |
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.titlebar.mov
The text was updated successfully, but these errors were encountered: