[gtk+/client-side-windows: 240/284] Relax the check for ignoring events above the content view



commit 41d40786b1a945fd8147f338d87429e2135aee0b
Author: Richard Hult <richard imendio com>
Date:   Tue Feb 3 16:14:33 2009 +0100

    Relax the check for ignoring events above the content view
---
 gdk/quartz/gdkevents-quartz.c |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/gdk/quartz/gdkevents-quartz.c b/gdk/quartz/gdkevents-quartz.c
index 3ea4ad0..1c3a177 100644
--- a/gdk/quartz/gdkevents-quartz.c
+++ b/gdk/quartz/gdkevents-quartz.c
@@ -519,11 +519,14 @@ find_window_for_ns_event (NSEvent *nsevent,
 	  {
 	    /* The non-grabbed case. */
 
-            /* Leave events above the window (e.g. possibly on the titlebar)
-             * to cocoa.
+            /* Ignore all events but mouse moved that might be on the title
+             * bar (above the content view). The reason is that otherwise
+             * gdk gets confused about getting e.g. button presses with no
+             * window (the title bar is not known to it).
              */
-            if (*y < 0)
-              return NULL;
+            if (event_type != NSMouseMoved)
+              if (*y < 0)
+                return NULL;
 
             /* FIXME: Also need to leave resize events to cocoa somehow? */
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]