13
0

change ordering of origin-move and window-resize for AU plugins

This commit is contained in:
Paul Davis 2016-04-27 15:47:43 -04:00
parent c1c81a239c
commit 70b88d5e89

View File

@ -597,15 +597,6 @@ AUPluginUI::cocoa_view_resized ()
[au_view setAutoresizingMask:NSViewNotSizable]; [au_view setAutoresizingMask:NSViewNotSizable];
/* this resizes the window. it will eventually trigger a new
* size_allocate event/callback, and we'll end up in
* ::update_view_size(). We want to stop that from doing anything,
* because we've already resized the window to fit the new new view,
* so there's no need to actually update the view size again.
*/
[window setFrame:windowFrame display:1];
/* Some stupid AU Views change the origin of the original AU View when /* Some stupid AU Views change the origin of the original AU View when
they are resized (I'm looking at you AUSampler). If the origin has they are resized (I'm looking at you AUSampler). If the origin has
been moved, move it back. been moved, move it back.
@ -628,6 +619,15 @@ AUPluginUI::cocoa_view_resized ()
<< std::endl; << std::endl;
} }
/* this resizes the window. it will eventually trigger a new
* size_allocate event/callback, and we'll end up in
* ::update_view_size(). We want to stop that from doing anything,
* because we've already resized the window to fit the new new view,
* so there's no need to actually update the view size again.
*/
[window setFrame:windowFrame display:1];
[au_view setAutoresizingMask:old_auto_resize]; [au_view setAutoresizingMask:old_auto_resize];
/* keep a copy of the size of the AU NSView. We didn't set - the plugin did */ /* keep a copy of the size of the AU NSView. We didn't set - the plugin did */