maximize problem in Fluxbox

Bug #1201454 reported by Julián Moreno Patiño
36
This bug affects 7 people
Affects Status Importance Assigned to Milestone
Terminator
Fix Released
High
Unassigned
terminator (Arch Linux)
New
Undecided
Unassigned
terminator (Ubuntu)
Fix Committed
Undecided
Unassigned

Bug Description

Hello,

When it's used Fluxbox as Windows Manager, terminator has problem to maximize.

To reproduce the problem, just click in maximize button twice.

Here there is a video reproducing the problem:
http://www.youtube.com/watch?v=nP8I164FasM

When commenting the call to set_geometry_hints out in window.py in set_rough_geometry_hints it works.

# self.set_geometry_hints(self, -1, -1, -1, -1, ,
# extra_height, font_width, font_height, -1.0, -1.0)

I also noticed that the values for extra_width and extra_height get negative.

Thank you so much for your attention.

Kind regards,

--
Julián Moreno Patiño
Debian Developer
 .''`. Debian GNU/{Linux,KfreeBSD}
: :' : Free Operating Systems
`. `'  http://debian.org/
  `-   GPG Fingerprint:
C2C8 904E 314C D8FA 041D 9B00 D5FD FC15 6168 BF60
Registered GNU Linux User ID 488513

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

Added to the correct project.

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

To add a further comment/datapoint: I've actually seen very similar (if not identical) behaviour when running remotely using Xming. Maximising results in the incredible shrinking Window. For the moment I'm at a loss as to what causes this.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

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

Related to this bug: https://answers.launchpad.net/terminator/+question/233133

I checked, and we are not directly messing with WM_NORMAL_HINTS. As seen in this bug report it's probably down to the set_geometry_hints call, and can be prevented by commenting that out. That means that the window resizes by pixels instead of characters.

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

I don't use Fluxbox, and don't currently have Xming to test this with. Can the OP (Julian) run Terminator with the -d option and attach the output. Keep it as simple as possible. Launch it, maximise it, let it shrink, then close/kill it. Then attache the output to this ticket.

Changed in terminator:
status: Confirmed → Incomplete
Changed in terminator (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
Julián Moreno Patiño (junix) wrote :

Hello,

Information requested attached.

Thanks in advance.

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

Hi Julian,

OK, I looked at that, and yes some odd values that seem to oscillate, and then go negative. I have a simple "fix" that should work. I'd appreciate it if you can test it. In terminatorlib.window.py find the following

    def set_rough_geometry_hints(self):
        """Walk all the terminals along the top and left edges to fake up how
        many columns/rows we sort of have"""
        if not hasattr(self, 'cached_maker'):
            self.cached_maker = Factory()

and change it to:

    def set_rough_geometry_hints(self):
        """Walk all the terminals along the top and left edges to fake up how
        many columns/rows we sort of have"""
        if self.ismaximised == True:
            return
        if not hasattr(self, 'cached_maker'):
            self.cached_maker = Factory()

This should keep the normal unmaximised behaviour of a stepped resize, while preventing the odd behaviour on Fluxbox and Windows/XMing when maximising.. If it works for you, I'll commit the fix.

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

That of course is in terminatorlib/window.py, not terminatorlib.window.py
:-)

Revision history for this message
Mark Caglienzi (mark-caglienzi) wrote :

I'm sorry to intervene, I come from http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=706600 and I am affected by the same bug (Debian Jessie with Fluxbox).

I tried to add those two lines to /usr/share/terminator/terminatorlib/window.py and the behaviour, at least in my system, is fixed.

Thank you :-)

Changed in terminator:
status: Incomplete → Fix Committed
Changed in terminator (Ubuntu):
status: Incomplete → Fix Committed
Revision history for this message
Liquibyte (liquibyte) wrote :

I've also experienced this issue and applied Stephen's patch. It "mostly" works to 99.995%. The only thing I can add to this is that it happened again only twice and for no apparent reason right after I applied the fix and is not reproducable that I can tell. If I can figure out how to reproduce it consistently, I'll add more info.

Revision history for this message
Liquibyte (liquibyte) wrote :

I've confirmed reproducability. In Fluxbox have your ~/.fluxbox/keys file set:

# double click on the titlebar to shade
OnTitlebar Double Mouse1 :Maximize

Running Fluxbox, open Terminator, open another window so Terminator loses focus. Maximize Terminator double clicking on titlebar, restore by double clicking. You may have to do this a few times but eventually the behavior happens as reported.

Attached is the output from terminator -d and is kind of long because it took me awhile to make it happen.

Revision history for this message
Liquibyte (liquibyte) wrote :

This is reproducable in an odd way. It seems certain inexplicable conditions need to be met for set_rough_geometry_hints to fail.

Use the same conditions for fluxbox keys file. Open terminator and use it to open itself with terminator -d move the window so it snaps to the top middle and just keep double clicking the titlebar and it will eventually happen again.

Revision history for this message
Liquibyte (liquibyte) wrote :

This is the way I can get repeatability consistently.

Use the same conditions for fluxbox keys file.

Have Firefox running but minimized. Have Geany running not minimized. Open Terminator. Restart Fluxbox. Open Terminator with itself terminator -d. Drag the second Terminator window to the top of the monitor until it snaps to the screen edge. Bring Geany to the top. Double click the second Terminator titlebar until the undesired behavior happens.

Sorry it took me three tries to get but the conditions are odd. Doing the above will consistently reproduce the undesired behavior. Now for the odd part. Do this once and it will happen with just two double clicks. Do it a second time and it takes four double clicks. Third time, six double clicks. Fourth time, eight double clicks etc...

I'm not sure if Geany or Firefox is required for this to specifically work or not but using these conditions I can get the number of double clicks to increment until the undesired behavior happens every time.

I hope this helps out because I really like Terminator and while this isn't life changing, it is kind of annoying to have happen when your watching output, maximize then restore and all of a sudden can't see what's going on.

Revision history for this message
Rogério Vinhal Nunes (rogeriovn) wrote :

This bug also happened to me while using a quite different set up. I'm using Terminator via SSH with X using mobaXterm which holds a X server in Windows 8.1. It must be a quite crude X server, but it works fine unless by this bug.

In my Linux VM in which Terminator is installed I'm running Ubuntu 14.10 with terminator version 0.97-4.

Setting the self.pending_set_rough_geometry_hint = True makes it work fine. The def set_rough_geometry_hints(self) is already changed to the proposed method and it doens't work.

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.