diff options
author | Robin Gareus <robin@gareus.org> | 2015-10-28 14:09:13 +0100 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2015-10-28 14:10:49 +0100 |
commit | 0992272858858e9991fc433e6eefa56a2ee968d4 (patch) | |
tree | cb8cc16262533c6811ffa54131ad2d8aa5ecc48a /gtk2_ardour/au_pluginui.mm | |
parent | 8d1edb13d3ab9d2e5a4051b82bd8dcfa8744c79a (diff) |
fix embedding AU/carbon UIs
the UI shows top/left (not centered, no resize) more detail work to come.
Diffstat (limited to 'gtk2_ardour/au_pluginui.mm')
-rw-r--r-- | gtk2_ardour/au_pluginui.mm | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/gtk2_ardour/au_pluginui.mm b/gtk2_ardour/au_pluginui.mm index a964017499..af174f9963 100644 --- a/gtk2_ardour/au_pluginui.mm +++ b/gtk2_ardour/au_pluginui.mm @@ -240,11 +240,13 @@ AUPluginUI::AUPluginUI (boost::shared_ptr<PluginInsert> insert) low_box.signal_realize().connect (mem_fun (this, &AUPluginUI::lower_box_realized)); low_box.signal_visibility_notify_event ().connect (mem_fun (this, &AUPluginUI::lower_box_visibility_notify)); - low_box.signal_size_request ().connect (mem_fun (this, &AUPluginUI::lower_box_size_request)); - low_box.signal_size_allocate ().connect (mem_fun (this, &AUPluginUI::lower_box_size_allocate)); - low_box.signal_map ().connect (mem_fun (this, &AUPluginUI::lower_box_map)); - low_box.signal_unmap ().connect (mem_fun (this, &AUPluginUI::lower_box_unmap)); - low_box.signal_expose_event ().connect (mem_fun (this, &AUPluginUI::lower_box_expose)); + if (au_view) { + low_box.signal_size_request ().connect (mem_fun (this, &AUPluginUI::lower_box_size_request)); + low_box.signal_size_allocate ().connect (mem_fun (this, &AUPluginUI::lower_box_size_allocate)); + low_box.signal_map ().connect (mem_fun (this, &AUPluginUI::lower_box_map)); + low_box.signal_unmap ().connect (mem_fun (this, &AUPluginUI::lower_box_unmap)); + low_box.signal_expose_event ().connect (mem_fun (this, &AUPluginUI::lower_box_expose)); + } } AUPluginUI::~AUPluginUI () @@ -539,8 +541,8 @@ AUPluginUI::create_carbon_view () req_width = (int) (size.x + 0.5); req_height = (int) (size.y + 0.5); - SizeWindow (carbon_window, prefwidth, req_height, true); - low_box.set_size_request (prefwidth, req_height); // ?? + SizeWindow (carbon_window, req_width, req_height, true); + low_box.set_size_request (req_width, req_height); return 0; #else @@ -596,13 +598,6 @@ AUPluginUI::parent_carbon_window () return -1; } - Gtk::Container* toplevel = get_toplevel(); - - if (!toplevel || !toplevel->is_toplevel()) { - error << _("AUPluginUI: no top level window!") << endmsg; - return -1; - } - /* figure out where the cocoa parent window is in carbon-coordinate space, which differs from both cocoa-coordinate space and GTK-coordinate space */ |