]> git.sesse.net Git - vlc/commitdiff
MacOSX/Framework/VLCEventManager.m: Don't send grouped events to the same target...
authorPierre d'Herbemont <pdherbemont@videolan.org>
Sat, 5 Jan 2008 13:51:21 +0000 (13:51 +0000)
committerPierre d'Herbemont <pdherbemont@videolan.org>
Sat, 5 Jan 2008 13:51:21 +0000 (13:51 +0000)
extras/MacOSX/Framework/Sources/VLCEventManager.m

index 1526c49f46fdbfe9149c04769cb8c8733bd378e4..87d881ba65b9617699cb7bc556cb6b2f53eb70ce 100644 (file)
@@ -133,9 +133,11 @@ static void * EventDispatcherMainLoop(void * user_data)
                     [message_newer->u.object release];
                     [[self messageQueue] removeObjectAtIndex:i];
                 }
-                /* It should be a good idea not to collapse event, with other kind of event in-between
+                /* It shouldn be a good idea not to collapse event with other kind of event in-between.
+                 * This could be particulary problematic when the same object receive two related events
+                 * (for instance Added and Removed).
                  * Ignore for now only if target is the same */
-                else if( message_newer->target != message->target )
+                else if( message_newer->target == message->target )
                     break;
             }
             
@@ -207,6 +209,7 @@ static void * EventDispatcherMainLoop(void * user_data)
 
 - (void)callOnMainThreadDelegateOfObject:(id)aTarget withDelegateMethod:(SEL)aSelector withNotificationName: (NSString *)aNotificationName
 {
+    /* Don't send on main thread before this gets sorted out */
 //    NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
     
     message_t message = 
@@ -229,7 +232,7 @@ static void * EventDispatcherMainLoop(void * user_data)
 //        pthread_mutex_unlock( [self queueLock] );
 //    }
     
-    [pool release];
+//    [pool release];
 }
 
 - (void)callOnMainThreadObject:(id)aTarget withMethod:(SEL)aSelector withArgumentAsObject: (id)arg