Double clicking separator flashes but does not rebalanced

Bug #1504560 reported by Paul Nickerson
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Terminator
Fix Released
Medium
Stephen Boddy

Bug Description

I am on Fedora 22, Workstation Edition, with Terminator 0.98. When I have some unbalanced terminals, I should be able to double click a splitter to rebalance them. However, it only flashes the splitter to the properly evenly distributed location, and keeps the splitter where it is. It's as though it does what it's supposed to for a split second, and then immediately undoes it.

I have tried holding combinations of Shift and Super (I had to use Tweak Tool > Windows > Windows Activation Key > Alt to get Super to work), but using them did not help.

I've attached a section of debug output from when I double click. I will attach my config after I submit the ticket. I tried using the trunk of Terminator, and it has the same problem.

Related branches

Revision history for this message
Paul Nickerson (pgn674) wrote :
Revision history for this message
Paul Nickerson (pgn674) wrote :
Revision history for this message
Stephen Boddy (stephen-j-boddy) wrote :

Hmm. I sometimes see this, but it is an intermittent issue. Usually it works, occasionally it doesn't. Are you saying that the double-click *never* works for you? Are you running on a really slow or a really fast system? My hunch is that we hitting some kind of race or logical "oopse" in the event handling. Possibly system speed makes the problem more obvious for some people.

Unconfirmed suspicion: Your system is so fast that between the double-press button event and the button release event, the rebalance has already happened. The release event perhaps is then moving the splitter back to where the mouse is. We might need to capture and ignore release events when we have just performed a rebalance.

Changed in terminator:
importance: Undecided → Medium
status: New → Incomplete
Revision history for this message
Stephen Boddy (stephen-j-boddy) wrote :

Another question: Just in case, I see you have window geometry hints turned on. (Global Preferences tab). If you turn them off do you get the same behaviour as when turned on?

Revision history for this message
Paul Nickerson (pgn674) wrote :

No, not every time. My system is fast I think, a Lenovo ThinkPad T450s that I set up just last week. I have a lot of applications open right now so it's a little bogged down, and now the double click is working about a third of the time. I tried slow and quick double clicks, but I'm not seeing any correlation. I tried disabling window geometry hints, and the behavior did not change.

Oh, but I did just find a correlation. For the purpose of this description, I'm going to say a double click is pressing down; releasing ("up"); has short, medium, and long waits; and I can pause at any time. Now, a normal double click for me is "down-medium-up-long-down-medium-up". But, if I change my action to "down-medium-up-long-down-pause", and then move my mouse, I see that the separator flashed, came back to my mouse, and is now moving with my mouse. But, if I do "down-medium-up-long-down-short-up", (and it is pretty difficult to get that short wait short enough), the splitter gets rebalanced successfully.

I think you've hit the nail on the head there with your suspicion, from my experience.

Revision history for this message
Paul Nickerson (pgn674) wrote :

Is there anything more that's needed to make the status not Incomplete? I am still experiencing this issue, though I have gotten a little better at carefully making the second half of my double click very quick.

Revision history for this message
Stephen Boddy (stephen-j-boddy) wrote :

No, nothing more than a gentle reminder :-)

I'll put it into triaged, although it is not so easily reproducible for me, I do see it sometimes. The tricky bit will be coming up with a decent fix... Hmmm... I wonder if the release event also has the _2BUTTON_PRESS type? That might mean we can ignore the release resulting from double click and still properly event on the press-drag-release. I'll see if I can come up with a simple modification for you to test.

Changed in terminator:
status: Incomplete → Triaged
assignee: nobody → Stephen Boddy (stephen-j-boddy)
Revision history for this message
Stephen Boddy (stephen-j-boddy) wrote :

OK, so I found following your instructions about slow second clicks let me reproduce easier. I also think I have a fix! Hopefully you are up to trying it out?

You'll need to apply the patch I'm going to attach to the terminatorlib/paned.py file.

Changed in terminator:
status: Triaged → In Progress
Revision history for this message
Stephen Boddy (stephen-j-boddy) wrote :
Revision history for this message
Paul Nickerson (pgn674) wrote :

I pulled down the latest from Bazaar and applied the patch to that. It works perfectly. I can slow or fast double click, or even do the down-medium-up-long-down-pause-drag, and it all works as expected. I tried it with lots of panes inside panes and beside panes, horizontal and vertical, in all directions. And I made sure the problem was still occurring in my system version of Terminator.

It's all good. Thank you.

Revision history for this message
Paul Nickerson (pgn674) wrote :

Also, I undid the patch and tested the latest pure from Bazaar, and that does indeed still have the problem. So it's definitely your patch that fixes it.

Revision history for this message
Stephen Boddy (stephen-j-boddy) wrote :

Excellent. I wrote the original balancing code, and it was always a bit glitchy with occasional failures and my attempts to fix it introduced flickering as it tried multiple rebalances. Thanks to your bug and engagement in the troubleshooting process, one of my pet peeves (the flickering) is now gone too. I'll commit the fix when I get chance, so I'm leaving the bug in the current state till I've done that.

Revision history for this message
Stephen Boddy (stephen-j-boddy) wrote :

Fixed in rev 1679.

Changed in terminator:
status: In Progress → Fix Committed
Changed in terminator:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.