Reset window-size when switching between custom and generic plugin UI.
authorRobin Gareus <robin@gareus.org>
Tue, 14 Feb 2017 00:05:43 +0000 (01:05 +0100)
committerRobin Gareus <robin@gareus.org>
Tue, 14 Feb 2017 00:05:43 +0000 (01:05 +0100)
Both views have uncorrelated geometry, apply one size to the other
makes no sense and usually results in odd window sizes, particularly
for custom plugin UIs with aspect-ratio constraints.

gtk2_ardour/processor_box.cc

index b5fe9abbe26600e5427ecd717f56839ac3bdf631..2564d070a8c534b1ca2204e59cdedf84bbdf7b69 100644 (file)
@@ -4286,6 +4286,7 @@ ProcessorWindowProxy::get (bool create)
        }
        if (_window && (is_custom != want_custom)) {
                /* drop existing window - wrong type */
+               set_state_mask (Gtkmm2ext::WindowProxy::StateMask (state_mask () & ~WindowProxy::Size));
                drop_window ();
        }
 
@@ -4310,6 +4311,7 @@ ProcessorWindowProxy::show_the_right_window ()
 {
        if (_window && (is_custom != want_custom)) {
                /* drop existing window - wrong type */
+               set_state_mask (Gtkmm2ext::WindowProxy::StateMask (state_mask () & ~WindowProxy::Size));
                drop_window ();
        }
        toggle ();