-
Notifications
You must be signed in to change notification settings - Fork 678
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
WIP: apprt/gtk: fix equalizing when doubleclicking near the divider #4443
base: main
Are you sure you want to change the base?
WIP: apprt/gtk: fix equalizing when doubleclicking near the divider #4443
Conversation
In the Discord server, Kat has confirmed that this work on their system without the size rebouncing back issue that I and some other people are having. I am wondering if a new discussion should be created regarding that issue or not, as it seems like that requires more of knowing how to work with gtk which I currently don't have. Still also want some comments regarding |
Note I reverted bec46fc I'd still like double clicking dividers to equalize. That is something I've actually tried before and wanted to work, and something that I've found generally works in other "divided" programs. |
Good to know. In that case I will keep the issue as one then. Will rebase this for now and figure out a way for double clicking the divider itself to not be buggy like it currently is. |
5ca807a
to
3d42986
Compare
3d42986
to
6b37b92
Compare
I have some updates. The bug with the rebouncing only occurs when double-clicking at When looking through the GTK debug inspector (
Moreover, I have also been chatting with the author of the original PR in this thread of the Ghostty Discord, in which they suggested trying to bind the gesture click signal they did to |
This PR aims to fix #4354 .
Before
Screencast.From.2025-01-03.07-30-23.mp4
After
Screencast.From.2025-01-03.07-31-07.mp4
As you can see in the fix, one problem is that sometimes the resizing is bounced back to the original sizing (I didn't show it here, but this happens prior to this fix as well). My suspicion is with the race condition of doubleclick to equalize (this PR) and with the dragging of the divider to resize the panes. However, the latter might be a GTK feature we just use (?) as I couldn't find it anywhere in the codebase...
Apart from that, the function
equalizeTopSplit
I added in this fix, which climbs up the split parents to the topmost one, seems to partially function similarly toequalizeSplits
insideapprt/gtk/App.zig
(in the app we can just get the topmost split, while here we have to climb up as the Splits only have the knowledge of its parent). I want to prevent code repetition, so some advice here will also be nice as well.