summaryrefslogtreecommitdiff
path: root/libs
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2017-03-21 05:37:44 +0100
committerRobin Gareus <robin@gareus.org>2017-03-21 05:37:44 +0100
commit85b5741081e6932fdebf4a6fa2cd69e5f889e67f (patch)
tree1429fff64f2ff8b3d9386ad76a6af876d3cbfe77 /libs
parent533a93daa6c311348b286a3caf81c59b25bd1d7f (diff)
Allow to selectively use NSGLView Canvas
Various GdkEvents are not yet handled correctly, eg. unpacking a widget from its container does not unmap it, nor are remaining widgets in the contained re-positioned (size allocation does not change, nor does the mapping). This affects eg. Mixbus Strips
Diffstat (limited to 'libs')
-rw-r--r--libs/canvas/canvas.cc6
-rw-r--r--libs/canvas/canvas/canvas.h2
2 files changed, 8 insertions, 0 deletions
diff --git a/libs/canvas/canvas.cc b/libs/canvas/canvas.cc
index 9e47792758..1995608a9f 100644
--- a/libs/canvas/canvas.cc
+++ b/libs/canvas/canvas.cc
@@ -401,7 +401,13 @@ GtkCanvas::GtkCanvas ()
add_events (Gdk::BUTTON_PRESS_MASK | Gdk::BUTTON_RELEASE_MASK | Gdk::POINTER_MOTION_MASK |
Gdk::SCROLL_MASK | Gdk::ENTER_NOTIFY_MASK | Gdk::LEAVE_NOTIFY_MASK |
Gdk::KEY_PRESS_MASK | Gdk::KEY_RELEASE_MASK);
+}
+void
+GtkCanvas::use_nsglview ()
+{
+ assert (!_nsglview);
+ assert (!is_realized());
#ifdef ARDOUR_CANVAS_NSVIEW_TAG // patched gdkquartz.h
# ifndef __ppc__ // would need to flip RGBA <> RGBA
_nsglview = Gtkmm2ext::nsglview_create (this);
diff --git a/libs/canvas/canvas/canvas.h b/libs/canvas/canvas/canvas.h
index 60e75bf8bf..ec66f71025 100644
--- a/libs/canvas/canvas/canvas.h
+++ b/libs/canvas/canvas/canvas.h
@@ -181,6 +181,8 @@ public:
GtkCanvas ();
~GtkCanvas () { _in_dtor = true ; }
+ void use_nsglview ();
+
void request_redraw (Rect const &);
void request_size (Duple);
void grab (Item *);