AudioUnit: fix cocoa window resizing - part 2
Previously no unmap events were delivered (due to a bug in
Gtk EventBox), `lower_box_map` was called only once.
Furthermore when cross-compiling (ARM binary on Intel),
COCOA_LIVE_RESIZING was not detected.
see also df21698ea7
This commit is contained in:
parent
a48df667f6
commit
6b636b8220
|
@ -50,6 +50,8 @@
|
|||
#include <gtkmm/button.h>
|
||||
#include <gtkmm/label.h>
|
||||
|
||||
#include "widgets/eventboxext.h"
|
||||
|
||||
#include "plugin_ui.h"
|
||||
|
||||
namespace ARDOUR {
|
||||
|
@ -117,8 +119,8 @@ private:
|
|||
int prefheight;
|
||||
int prefwidth;
|
||||
|
||||
Gtk::HBox top_box;
|
||||
Gtk::EventBox low_box;
|
||||
Gtk::HBox top_box;
|
||||
ArdourWidgets::EventBoxExt low_box;
|
||||
Gtk::VBox vpacker;
|
||||
Gtk::Label automation_mode_label;
|
||||
Gtk::ComboBoxText automation_mode_selector;
|
||||
|
|
|
@ -693,6 +693,9 @@ AUPluginUI::create_cocoa_view ()
|
|||
req_width = frame.size.width;
|
||||
req_height = frame.size.height;
|
||||
low_box.queue_resize ();
|
||||
} else {
|
||||
req_width = 0;
|
||||
req_height = 0;
|
||||
}
|
||||
|
||||
#ifdef AU_DEBUG_SIZE
|
||||
|
@ -1150,7 +1153,7 @@ AUPluginUI::parent_cocoa_window ()
|
|||
|
||||
// catch notifications that live resizing is about to start
|
||||
|
||||
#if HAVE_COCOA_LIVE_RESIZING
|
||||
#ifdef HAVE_COCOA_LIVE_RESIZING
|
||||
_resize_notify = [ [ LiveResizeNotificationObject alloc] initWithPluginUI:this ];
|
||||
|
||||
[[NSNotificationCenter defaultCenter] addObserver:_resize_notify
|
||||
|
|
|
@ -458,15 +458,20 @@ def configure(conf):
|
|||
conf.env.append_value(var, ['-isystem', d])
|
||||
|
||||
if sys.platform == 'darwin':
|
||||
conf.check(
|
||||
msg ='Checking for Cocoa live resizing constants',
|
||||
fragment = '#include <AppKit/NSWindow.h>\n int main(void) { (void) NSWindowWillStartLiveResizeNotification; return 0; }\n',
|
||||
define_name = 'HAVE_COCOA_LIVE_RESIZING',
|
||||
uselib_store = 'COCOA_LIVE_RESIZING',
|
||||
compiler = 'cc',
|
||||
compile_filename = 'test.m',
|
||||
execute = True,
|
||||
mandatory = False)
|
||||
if conf.env['build_target'] in ['bigsur', 'monterey']:
|
||||
# we cannot execute test code when x-compiling ARM on Intel,
|
||||
# besides, NSWindowWillStartLiveResizeNotification is definitly available
|
||||
conf.define('HAVE_COCOA_LIVE_RESIZING', 1)
|
||||
else:
|
||||
conf.check(
|
||||
msg ='Checking for Cocoa live resizing constants',
|
||||
fragment = '#include <AppKit/NSWindow.h>\n int main(void) { (void) NSWindowWillStartLiveResizeNotification; return 0; }\n',
|
||||
define_name = 'HAVE_COCOA_LIVE_RESIZING',
|
||||
uselib_store = 'COCOA_LIVE_RESIZING',
|
||||
compiler = 'cc',
|
||||
compile_filename = 'test.m',
|
||||
execute = True,
|
||||
mandatory = False)
|
||||
|
||||
conf.write_config_header('gtk2ardour-config.h', remove=False)
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user