summaryrefslogtreecommitdiff
path: root/gtk2_ardour/editor_mouse.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2012-03-09 17:15:25 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2012-03-09 17:15:25 +0000
commitc52c2b7368cf40eda6fcbe5840de6390e58ac382 (patch)
tree6e6bf9df8fc4edad7b18c50ca7aa2f16efdc93da /gtk2_ardour/editor_mouse.cc
parent3e3d831251ec026eec1887697f6873650536848e (diff)
forward-port some fixes from a2
git-svn-id: svn://localhost/ardour2/branches/3.0@11630 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/editor_mouse.cc')
-rw-r--r--gtk2_ardour/editor_mouse.cc15
1 files changed, 15 insertions, 0 deletions
diff --git a/gtk2_ardour/editor_mouse.cc b/gtk2_ardour/editor_mouse.cc
index a3a563340f..404affeaa1 100644
--- a/gtk2_ardour/editor_mouse.cc
+++ b/gtk2_ardour/editor_mouse.cc
@@ -91,6 +91,21 @@ using Gtkmm2ext::Keyboard;
bool
Editor::mouse_frame (framepos_t& where, bool& in_track_canvas) const
{
+ /* gdk_window_get_pointer() has X11's XQueryPointer semantics in that it only
+ pays attentions to subwindows. this means that menu windows are ignored, and
+ if the pointer is in a menu, the return window from the call will be the
+ the regular subwindow *under* the menu.
+
+ this matters quite a lot if the pointer is moving around in a menu that overlaps
+ the track canvas because we will believe that we are within the track canvas
+ when we are not. therefore, we track enter/leave events for the track canvas
+ and allow that to override the result of gdk_window_get_pointer().
+ */
+
+ if (!within_track_canvas) {
+ return false;
+ }
+
int x, y;
double wx, wy;
Gdk::ModifierType mask;