Allow plugin inline displays to shrink
authorJohannes Mueller <github@johannes-mueller.org>
Tue, 15 Aug 2017 19:05:13 +0000 (21:05 +0200)
committerRobin Gareus <robin@gareus.org>
Wed, 20 Jun 2018 19:06:16 +0000 (21:06 +0200)
commitf647ac7daea3d5ae8bfb2903bff67fffcc6197df
treec7c5b384cfb43b2b8cc52947c279717af6d5821d
parent869d48c9a68331547c1f84e3dac12ea444d46376
Allow plugin inline displays to shrink

Plugin inline displays were forbidden to shrink as this might cause a deadlock
when the shrinkage causes the scrollbar to disappear.

display shrink → scrollbar unneeded → scrollbar disappears →
more horizontal space -> display grows -> scrollbar appears →
less horizontal space -> display shrink and so forth

This was formerly avoided by not allowing display shrinkage.

The solution proposed here sets the maximum height of the display to the
current height, if a scrollbar is present during resizing and has not been
present during the last resizing. So if this scrollbar disappears (after
resizing it might no longer be needed), the display would have the possibility
to grow, but it does not grow vertically as the maximum height is limited to
the current height.
gtk2_ardour/processor_box.cc
gtk2_ardour/processor_box.h