gtk+ r19402 - in trunk: . gdk/quartz



Author: rhult
Date: Fri Jan 25 13:19:02 2008
New Revision: 19402
URL: http://svn.gnome.org/viewvc/gtk+?rev=19402&view=rev

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

	* gdk/quartz/GdkQuartzView.c: Don't recreate a tracking rect if it
	didn't change, fixes focus event issues for undecorated windows.


Modified:
   trunk/ChangeLog
   trunk/gdk/quartz/GdkQuartzView.c

Modified: trunk/gdk/quartz/GdkQuartzView.c
==============================================================================
--- trunk/gdk/quartz/GdkQuartzView.c	(original)
+++ trunk/gdk/quartz/GdkQuartzView.c	Fri Jan 25 13:19:02 2008
@@ -167,8 +167,22 @@
 
 -(void)setBounds:(NSRect)bounds
 {
+  NSRect old_bounds;
+  gboolean changed = FALSE;
+
+  old_bounds = [self bounds];
+  if (old_bounds.origin.x != bounds.origin.x ||
+      old_bounds.origin.y != bounds.origin.y ||
+      old_bounds.size.width != bounds.size.width ||
+      old_bounds.size.height != bounds.size.height)
+    {
+      changed = TRUE;
+    }
+  
   [super setBounds:bounds];
-  [self updateTrackingRect];
+
+  if (changed)
+    [self updateTrackingRect];
 }
 
 @end



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