summaryrefslogtreecommitdiff
path: root/gtk2_ardour/plugin_ui.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2012-06-06 01:43:35 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2012-06-06 01:43:35 +0000
commite5bb4c94edc5e796e021be028a77102f0e1a7b79 (patch)
tree5cb7898485e54375033684d0f01c9e16f44774e4 /gtk2_ardour/plugin_ui.cc
parent9a0b1cce075f32768197d001f269a191869cc4e6 (diff)
kludgy hack/fix for plugin windows reappearing at (0,0) after re-activating ardour as app on OS X. having spent an entire day investigating the issue, this seems like an expedient though sad fix
git-svn-id: svn://localhost/ardour2/branches/3.0@12573 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/plugin_ui.cc')
-rw-r--r--gtk2_ardour/plugin_ui.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/gtk2_ardour/plugin_ui.cc b/gtk2_ardour/plugin_ui.cc
index 4c17923abe..455cea1364 100644
--- a/gtk2_ardour/plugin_ui.cc
+++ b/gtk2_ardour/plugin_ui.cc
@@ -89,6 +89,11 @@ PluginUIWindow::PluginUIWindow (
: parent (win)
, was_visible (false)
, _keyboard_focused (false)
+#ifdef AUDIOUNIT_SUPPORT
+ , pre_deactivate_x (-1)
+ , pre_deactivate_y (-1)
+#endif
+
{
bool have_gui = false;
@@ -341,11 +346,15 @@ PluginUIWindow::app_activated (bool)
if (yn) {
if (was_visible) {
_pluginui->activate ();
+ if (pre_deactivate_x >= 0) {
+ move (pre_deactivate_x, pre_deactivate_y);
+ }
present ();
was_visible = true;
}
} else {
was_visible = is_visible();
+ get_position (pre_deactivate_x, pre_deactivate_y);
hide ();
_pluginui->deactivate ();
}
@@ -783,3 +792,4 @@ PlugUIBase::preset_added_or_removed ()
update_preset_list ();
update_preset ();
}
+