gtk+ r19934 - in trunk: . gdk/quartz



Author: rhult
Date: Tue Mar 25 13:49:03 2008
New Revision: 19934
URL: http://svn.gnome.org/viewvc/gtk+?rev=19934&view=rev

Log:
2008-03-25  Richard Hult  <richard imendio com>

	* gdk/quartz/gdkevents-quartz.c:
	(_gdk_quartz_events_trigger_crossing_events): Bail out early if we
	can't find a matching window.

	* gdk/quartz/gdkwindow-quartz.c: (show_window_internal): Add a
	comment, and only trigger an event for non-temp windows, fixes
	problems for tooltips caused by the workarounds for the
	problematic tracking rect API.


Modified:
   trunk/ChangeLog
   trunk/gdk/quartz/gdkevents-quartz.c
   trunk/gdk/quartz/gdkwindow-quartz.c

Modified: trunk/gdk/quartz/gdkevents-quartz.c
==============================================================================
--- trunk/gdk/quartz/gdkevents-quartz.c	(original)
+++ trunk/gdk/quartz/gdkevents-quartz.c	Tue Mar 25 13:49:03 2008
@@ -1109,7 +1109,7 @@
   y = _gdk_quartz_window_get_inverted_screen_y (point.y);
 
   mouse_window = _gdk_quartz_window_find_child (_gdk_root, x, y);
-  if (mouse_window == _gdk_root)
+  if (!mouse_window || mouse_window == _gdk_root)
     return;
 
   /* NSMouseEntered always happens on the toplevel. */

Modified: trunk/gdk/quartz/gdkwindow-quartz.c
==============================================================================
--- trunk/gdk/quartz/gdkwindow-quartz.c	(original)
+++ trunk/gdk/quartz/gdkwindow-quartz.c	Tue Mar 25 13:49:03 2008
@@ -1137,7 +1137,10 @@
   if (impl->transient_for && !GDK_WINDOW_DESTROYED (impl->transient_for))
     _gdk_quartz_window_attach_to_parent (window);
 
-  if (impl->toplevel)
+  /* Create a crossing event for managed windows that pop up under the
+   * mouse. Part of the workarounds for problems with the tracking rect API.
+   */
+  if (impl->toplevel && private->window_type != GDK_WINDOW_TEMP)
     _gdk_quartz_events_trigger_crossing_events ();
 
   GDK_QUARTZ_RELEASE_POOL;



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